{"id":31737948,"url":"https://github.com/xhdndmm/web","last_synced_at":"2026-01-20T17:41:08.319Z","repository":{"id":246665169,"uuid":"821719549","full_name":"xhdndmm/web","owner":"xhdndmm","description":"xhdndmm.cn的源代码","archived":false,"fork":false,"pushed_at":"2025-10-02T22:59:37.000Z","size":79250,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T00:28:32.480Z","etag":null,"topics":["css","flask","html","javascript","python","website"],"latest_commit_sha":null,"homepage":"https://xhdndmm.cn/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xhdndmm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-29T08:39:26.000Z","updated_at":"2025-10-02T22:59:40.000Z","dependencies_parsed_at":"2024-08-08T12:49:31.022Z","dependency_job_id":"fe8a9822-7805-49cd-b760-2773fddffd56","html_url":"https://github.com/xhdndmm/web","commit_stats":null,"previous_names":["xhdndmm/web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xhdndmm/web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhdndmm%2Fweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhdndmm%2Fweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhdndmm%2Fweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhdndmm%2Fweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xhdndmm","download_url":"https://codeload.github.com/xhdndmm/web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhdndmm%2Fweb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001113,"owners_count":26083022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","flask","html","javascript","python","website"],"created_at":"2025-10-09T09:48:24.857Z","updated_at":"2026-01-20T17:41:08.313Z","avatar_url":"https://github.com/xhdndmm.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 本仓库是 [https://xhdndmm.net/]() 的源代码\n\n## 项目结构\n```\n.\n├── api\n│   └── main.py\n├── data\n│   ├── aos.css\n│   ├── aos.js\n│   ├── autoload.js\n│   ├── index.css\n│   ├── index.js\n│   ├── logo.jpg\n│   └── particles.min.js\n├── favicon.ico\n├── index.html\n├── LICENSE\n├── LICENSE-CODE\n├── README.md\n├── requirements.txt\n├── robots.txt\n├── sitemap.xml\n└── start.sh\n\n3 directories, 17 files\n```\n- `aos.js`、`aos.css`来自[https://github.com/michalsnik/aos]()\n- `autoload.js`来自[https://github.com/stevenjoezhang/live2d-widget]()\n- `particles.min.js`来自[https://github.com/VincentGarreau/particles.js]()\n\n## 部署方法\n- 注：以debian系linux系统为例\n首先克隆存储库\n```\ngit clone https://github.com/xhdndmm/web.git\n```\n然后安装依赖\n```\ncd /path/to/web\nsudo apt update\nsudo apt install python3-pip gunicorn nginx\npip install -r requirements.txt\n```\n然后修改nginx配置文件（模板已添加gzip和基础安全设置，可根据需要修改，此文件一般在`/etc/nginx/nginx.conf`）\n```\nuser root;\nworker_processes auto;\npid /run/nginx.pid;\ninclude /etc/nginx/modules-enabled/*.conf;\n\nevents {\n    worker_connections 768;\n}\n\nhttp {\n    include /etc/nginx/mime.types;\n    default_type application/octet-stream;\n    server_tokens off;  \n\n    gzip on;\n    gzip_vary on;\n    gzip_proxied any;\n    gzip_comp_level 6;\n    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript text/html;\n\n    limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;\n\n    server {\n        listen 80;\n        listen [::]:80;\n        server_name _;\n\n        return 444;\n    }\n\n    server {\n        listen 80;\n        listen [::]:80;\n        root /path/to/web ;\n        index index.html;\n\n        server_name example.com ;\n\n        access_log /path/to/log combined buffer=16k;\n        error_log /path/to/log warn;\n\n        location / {\n            limit_req zone=one burst=3 nodelay;\n        }\n\n        location /time_api {\n            limit_req zone=one burst=3 nodelay;\n            proxy_pass http://127.0.0.1:5000/time_api;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto $scheme;\n        }\n\n        location /counter {\n            limit_req zone=one burst=3 nodelay;\n            proxy_pass http://127.0.0.1:5000/counter;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto $scheme;\n        }\n\n        location /counter/increment {\n            limit_req zone=one burst=3 nodelay;\n            proxy_pass http://127.0.0.1:5000/counter/increment;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto $scheme;\n        }\n\n            location /server_status {\n            limit_req zone=one burst=3 nodelay;\n            proxy_pass http://127.0.0.1:5000/server_status;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto $scheme;\n        }\n    }\n}\n\n```\n进入网站根目录并运行以下命令以开启后端\n```shell\nsh start.sh\n```\n你也可以自行配置systemd等来实现开机自启\n\n## 协议\n### 内容许可\n本仓库中的**内容部分**（包括但不限于）：\n\n- `index.html` 中的 `meta`、`title`、`a`、`h1`、`h2`、`p` 标签内的文本内容  \n- `logo.png`\n- `favicon.ico`\n- `sitemap.xml`\n\n均采用 [CC BY 4.0](./LICENSE) 协议进行许可。  \n使用上述内容时，需遵守 CC BY 4.0 的署名、标明修改及附带许可证链接等要求。\n\n### 代码许可\n除上述内容外，本仓库中的**其余所有文件**均采用  \n[MIT](./LICENSE-CODE) 协议进行许可。\n\n### 使用说明\n如果你希望将本仓库的代码用于你自己的个人主页，  \n请在使用前**删除所有受 CC BY 4.0 许可的内容文件或内容部分**，  \n并自行替换为你的原创内容。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhdndmm%2Fweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxhdndmm%2Fweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhdndmm%2Fweb/lists"}