{"id":28252802,"url":"https://github.com/ravelloh/local-sitemap-generation","last_synced_at":"2026-05-15T20:31:55.595Z","repository":{"id":186335453,"uuid":"675014347","full_name":"RavelloH/local-sitemap-generation","owner":"RavelloH","description":"使用本地文件生成sitemap，支持workflow自动持续构建","archived":false,"fork":false,"pushed_at":"2023-08-05T14:34:51.000Z","size":403,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-12T18:48:59.044Z","etag":null,"topics":["nodejs","sitemap","sitemap-generator","workflow","xml"],"latest_commit_sha":null,"homepage":"https://ravelloh.top/sitemap.xml","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RavelloH.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}},"created_at":"2023-08-05T13:46:02.000Z","updated_at":"2024-02-11T04:02:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"18a4c322-6543-4ad5-8393-65a8a73cb8be","html_url":"https://github.com/RavelloH/local-sitemap-generation","commit_stats":null,"previous_names":["ravelloh/local-sitemap-generation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RavelloH/local-sitemap-generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavelloH%2Flocal-sitemap-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavelloH%2Flocal-sitemap-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavelloH%2Flocal-sitemap-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavelloH%2Flocal-sitemap-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RavelloH","download_url":"https://codeload.github.com/RavelloH/local-sitemap-generation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavelloH%2Flocal-sitemap-generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nodejs","sitemap","sitemap-generator","workflow","xml"],"created_at":"2025-05-19T16:16:42.606Z","updated_at":"2026-05-15T20:31:55.577Z","avatar_url":"https://github.com/RavelloH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# local-sitemap-generation\n使用本地文件生成sitemap，支持workflow自动持续构建\n\n## 效果 \n如本仓库目录下的sitemap.xml所示，可见此程序能自动将本地目录中的资源写入至sitemap.xml中，并再urlList.txt中保存中间结果。\n\n## 使用\n### 手动生成\n首先，你应该根据你的文件结构更改`fileList.js`中的配置文件：\n\n```javascript\nconst siteDomain = 'https://yourdomain.com/'; // 你的域名\nconst targetPath = './';  // 要生成sitemap的文件夹根目录\nconst preserveFile = './urlList.txt'; // 生成中间件urlList.txt的路径\n```\n\n之后，使用npm安装依赖，并进行生成操作 \n```\nnpm install\nnode fileList.js\nnpx sitemap \u003c .urlList.txt \u003e ./sitemap.xml\n```\n\n### 自动生成\n你可以使用Github Actions在文件发生更新时自动生成站点地图，参考本仓库中的`.github/workflows/sitemap.yml`设置即可\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravelloh%2Flocal-sitemap-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravelloh%2Flocal-sitemap-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravelloh%2Flocal-sitemap-generation/lists"}