sitemap.xml
See original GitHub issueIs your feature request related to a problem? Please describe.
Most websites need to provide a sitemap.xml
for SEO purposes.
Describe the solution you’d like SvelteKit should provide a way (automatically, or recommended way via documentation) on how to create a sitemap.xml.
Describe alternatives you’ve considered I see sitemap.xml generation is mentioned in the sapper repo - is this the way to do it?
Also mentioned by @antony here.
How important is this feature to you? I think this will affect a large number of SvelteKit users who are building websites.
Note
The SvelteKit homepage says:
SvelteKit doesn’t compromise on SEO
Without supporting sitemap.xml
, this claim is inaccurate/disingenuous.
Thank you!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:96
- Comments:32 (9 by maintainers)
Top Results From Across the Web
What is an XML sitemap and why should you have one? - Yoast
An XML sitemap is a file that lists a website's essential pages, making sure Google can find and crawl them all. It also...
Read more >Create your Google Sitemap Online - XML Sitemaps Generator
Free Online Google Sitemap Generator. XML-sitemaps.com provides free online sitemap generator service, creating an XML sitemap that can be submitted to ...
Read more >Build and Submit a Sitemap | Google Search Central
You can submit multiple sitemaps and/or sitemap index files to Google. XML. Here is a very basic XML sitemap that includes the location...
Read more >Protocol - sitemaps.org
This document describes the XML schema for the Sitemap protocol. The Sitemap protocol format consists of XML tags. All data values in a...
Read more >Sitemaps - Wikipedia
The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling. A Sitemap is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @auderer @madeleineostoja It was just proof-of-concept and it worked well for my case. But you’re right this should run as
postbuild
.So now (in v1.0.0) it already works as a
postbuild
(including dynamic routes) 🎉https://github.com/bartholomej/svelte-sitemap
Let me know how it works 😉
I agree with @antony SvelteKit should provide a way to expose the routing table.
But meanwhile… I needed sitemap for my static website (used with
adapter-static
) and I didn’t want to write it manually 😃 So I made a simple proof-of-concept library for myself – but maybe it will come in handy for someone.https://github.com/bartholomej/svelte-sitemap
Basically just install it and use it as
prebuild
script:And yes, I reckon that my library will soon become obsolete when the SvelteKit supports it natively 😉 👍