{"id":38205330,"url":"https://github.com/xshaheen/xdot-sitemap","last_synced_at":"2026-01-17T00:34:09.142Z","repository":{"id":65469263,"uuid":"397660778","full_name":"xshaheen/xdot-sitemap","owner":"xshaheen","description":"A package for .NET to help you build a sitemap according to the google recommendations.","archived":false,"fork":false,"pushed_at":"2022-10-06T16:05:40.000Z","size":31,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T09:33:38.307Z","etag":null,"topics":["csharp","dotnet","seo","sitemap","xml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xshaheen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T16:04:56.000Z","updated_at":"2025-02-07T07:29:23.000Z","dependencies_parsed_at":"2023-01-24T22:15:21.376Z","dependency_job_id":null,"html_url":"https://github.com/xshaheen/xdot-sitemap","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/xshaheen/xdot-sitemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xshaheen%2Fxdot-sitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xshaheen%2Fxdot-sitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xshaheen%2Fxdot-sitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xshaheen%2Fxdot-sitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xshaheen","download_url":"https://codeload.github.com/xshaheen/xdot-sitemap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xshaheen%2Fxdot-sitemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T23:55:29.509Z","status":"ssl_error","status_checked_at":"2026-01-16T23:55:29.108Z","response_time":107,"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":["csharp","dotnet","seo","sitemap","xml"],"created_at":"2026-01-17T00:34:09.033Z","updated_at":"2026-01-17T00:34:09.134Z","avatar_url":"https://github.com/xshaheen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xdot.Sitemap\n\nA package for .NET to help you build a sitemap according to the google recommendations. see [this link to learn about sitemaps][sitemap-google-docs].\n\n**if you like this work, please consider give the project star 🌟**\n\n## Installation\n\nUsing the [.NET CLI tools][dotnet-core-cli-tools]:\n\n```sh\ndotnet add package Xdot.Sitemap\n```\n\nUsing the [NuGet CLI][nuget-cli]:\n\n```sh\nnuget install Xdot.Sitemap\n```\n\nUsing the [Package Manager Console][package-manager-console]:\n\n```powershell\nInstall-Package Xdot.Sitemap\n```\n\n## Usage\n\n### Write a sitemap to stream\n\n```c#\nvar urls = new List\u003cSitemapUrl\u003e \n{\n    new(\"https://www.example.com\"),\n    new(\"https://www.example.com/contact-us\"),\n}\n\nawait using var stream = new MemoryStream();\nawait urls.WriteToAsync(stream);\n```\n\nThis code will write the following to the memory stream:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://www.example.com\u003c/loc\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://www.example.com/contact-us\u003c/loc\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\n### Write localized versions for a URL\n\n```c#\nvar urls = new List\u003cSitemapUrl\u003e \n{\n    new(new SitemapAlternateUrl[] \n    {\n        new() \n        {\n            Location = \"https://www.example.com/english/page.html\",\n            LanguageCode = \"en\",\n        },\n        new() \n        {\n            Location = \"https://www.example.com/deutsch/page.html\",\n            LanguageCode = \"de\",\n        },\n        new() \n        {\n            Location = \"https://www.example.com/schweiz-deutsch/page.html\",\n            LanguageCode = \"de-ch\",\n        },\n    }),\n    \n    // ...\n};\n\nawait using var stream = new MemoryStream();\nawait urls.WriteToAsync(stream);\n```\n\nThis code will write the following to the memory stream:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003curlset xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://www.example.com/english/page.html\u003c/loc\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"en\" href=\"https://www.example.com/english/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de\" href=\"https://www.example.com/deutsch/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de-ch\" href=\"https://www.example.com/schweiz-deutsch/page.html\" /\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://www.example.com/deutsch/page.html\u003c/loc\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"en\" href=\"https://www.example.com/english/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de\" href=\"https://www.example.com/deutsch/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de-ch\" href=\"https://www.example.com/schweiz-deutsch/page.html\" /\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://www.example.com/schweiz-deutsch/page.html\u003c/loc\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"en\" href=\"https://www.example.com/english/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de\" href=\"https://www.example.com/deutsch/page.html\" /\u003e\n    \u003cxhtml:link rel=\"alternate\" hreflang=\"de-ch\" href=\"https://www.example.com/schweiz-deutsch/page.html\" /\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\n\n### Write Sitemap Index\n\n```c#\nvar sitemapReferences = new List\u003cSitemapReference\u003e \n{\n    new() { Location = \"https://www.Example.com/ümlaT-sitemap.xml\" },\n    new() { Location = \"https://www.example.com/اداره-اعلانات\" },\n}\n\nawait using var stream = new MemoryStream()\nawait references.WriteToAsync(stream);\n```\nThis code will write the following to the memory stream:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003csitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003csitemap\u003e\n    \u003cloc\u003ehttps://www.example.com/%C3%BCmlat-sitemap.xml\u003c/loc\u003e\n  \u003c/sitemap\u003e\n  \u003csitemap\u003e\n    \u003cloc\u003ehttps://www.example.com/%D8%A7%D8%AF%D8%A7%D8%B1%D9%87-%D8%A7%D8%B9%D9%84%D8%A7%D9%86%D8%A7%D8%AA\u003c/loc\u003e\n  \u003c/sitemap\u003e\n\u003c/sitemapindex\u003e\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 license.\n\n## Contact\n\nIf you have any suggestions, comments or questions, please feel free to contact me on:\n\nEmail: mxshaheen@gmail.com\n\n\n[sitemap-google-docs]: https://developers.google.com/search/docs/advanced/sitemaps/overview\n[dotnet-core-cli-tools]: https://docs.microsoft.com/en-us/dotnet/core/tools/\n[nuget-cli]: https://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference\n[package-manager-console]: https://docs.microsoft.com/en-us/nuget/tools/package-manager-console\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxshaheen%2Fxdot-sitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxshaheen%2Fxdot-sitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxshaheen%2Fxdot-sitemap/lists"}