{"id":16339573,"url":"https://github.com/bouzuya/sitemap-xml-writer","last_synced_at":"2025-09-17T20:36:01.251Z","repository":{"id":101888755,"uuid":"608852761","full_name":"bouzuya/sitemap-xml-writer","owner":"bouzuya","description":"A Rust library for writing sitemap.xml","archived":false,"fork":false,"pushed_at":"2023-03-13T22:01:19.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T11:53:18.318Z","etag":null,"topics":["rust","sitemap","xml"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/sitemap-xml-writer","language":"Rust","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/bouzuya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2023-03-02T21:46:40.000Z","updated_at":"2023-03-13T21:42:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"99c63529-7519-44e5-aad9-278c74e633c2","html_url":"https://github.com/bouzuya/sitemap-xml-writer","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"17019afbb7ca9b9dcd08811697721e6bb2567cee"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bouzuya/sitemap-xml-writer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouzuya%2Fsitemap-xml-writer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouzuya%2Fsitemap-xml-writer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouzuya%2Fsitemap-xml-writer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouzuya%2Fsitemap-xml-writer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bouzuya","download_url":"https://codeload.github.com/bouzuya/sitemap-xml-writer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouzuya%2Fsitemap-xml-writer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275658802,"owners_count":25504780,"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-09-17T02:00:09.119Z","response_time":84,"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":["rust","sitemap","xml"],"created_at":"2024-10-10T23:54:38.511Z","updated_at":"2025-09-17T20:36:01.232Z","avatar_url":"https://github.com/bouzuya.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sitemap-xml-writer\n\nA Rust library for writing [`sitemap.xml`](https://www.sitemaps.org/).\n\n[![ci](https://github.com/bouzuya/sitemap-xml-writer/workflows/ci/badge.svg)](https://github.com/bouzuya/sitemap-xml-writer/actions)\n[![crates.io](https://img.shields.io/crates/v/sitemap-xml-writer)](https://crates.io/crates/sitemap-xml-writer)\n[![docs.rs](https://img.shields.io/docsrs/sitemap-xml-writer)](https://docs.rs/crate/sitemap-xml-writer)\n[![license](https://img.shields.io/crates/l/sitemap-xml-writer)](#license)\n\n## Feature flags\n\n- `\"chrono\"` ... `chrono::NaiveDate` and `chrono::DateTime` support\n- `\"time\"` ... `time::Date` and `time::OffsetDateTime` support\n- `\"url\"` ... `url::Url` support\n\n## Usage\n\n### Writing sitemap file\n\n```rust\nuse sitemap_xml_writer::{SitemapWriter, Url};\nuse std::io::Cursor;\n\nlet mut writer = SitemapWriter::start(Cursor::new(Vec::new()))?;\nwriter.write(\n    Url::loc(\"http://www.example.com/\")?\n        .lastmod(\"2005-01-01\")?\n        .changefreq(\"monthly\")?\n        .priority(\"0.8\")?,\n)?;\nwriter.end()?;\n\nlet actual = String::from_utf8(writer.into_inner().into_inner())?;\nlet expected = concat!(\n    r#\"\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\"#,\n    r#\"\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\"#,\n    r#\"\u003curl\u003e\"#,\n    r#\"\u003cloc\u003ehttp://www.example.com/\u003c/loc\u003e\"#,\n    r#\"\u003clastmod\u003e2005-01-01\u003c/lastmod\u003e\"#,\n    r#\"\u003cchangefreq\u003emonthly\u003c/changefreq\u003e\"#,\n    r#\"\u003cpriority\u003e0.8\u003c/priority\u003e\"#,\n    r#\"\u003c/url\u003e\"#,\n    r#\"\u003c/urlset\u003e\"#\n);\nassert_eq!(actual, expected);\n```\n\n### Writing sitemap index file\n\n```rust\nuse sitemap_xml_writer::{SitemapIndexWriter};\nuse std::io::Cursor;\n\nlet mut writer = SitemapIndexWriter::start(Cursor::new(Vec::new()))?;\nwriter.write(\n    Sitemap::loc(\"http://www.example.com/sitemap1.xml.gz\")?\n        .lastmod(\"2004-10-01T18:23:17+00:00\")?,\n)?;\nwriter.end()?;\n\nlet actual = String::from_utf8(writer.into_inner().into_inner())?;\nlet expected = concat!(\n    r#\"\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\"#,\n    r#\"\u003csitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\"#,\n    r#\"\u003csitemap\u003e\"#,\n    r#\"\u003cloc\u003ehttp://www.example.com/sitemap1.xml.gz\u003c/loc\u003e\"#,\n    r#\"\u003clastmod\u003e2004-10-01T18:23:17+00:00\u003c/lastmod\u003e\"#,\n    r#\"\u003c/sitemap\u003e\"#,\n    r#\"\u003c/sitemapindex\u003e\"#\n);\nassert_eq!(actual, expected);\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbouzuya%2Fsitemap-xml-writer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbouzuya%2Fsitemap-xml-writer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbouzuya%2Fsitemap-xml-writer/lists"}