question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is 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

image

Without supporting sitemap.xml, this claim is inaccurate/disingenuous.

Thank you!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:96
  • Comments:32 (9 by maintainers)

github_iconTop GitHub Comments

29reactions
bartholomejcommented, Jun 29, 2021

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

npm install svelte-sitemap --save-dev

Let me know how it works 😉

14reactions
bartholomejcommented, Jun 9, 2021

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:

npm install svelte-sitemap --save-dev
{
  "name": "my-project",
  "scripts": {
    "prebuild": "svelte-sitemap --domain https://mydomain.com"
  }
}

And yes, I reckon that my library will soon become obsolete when the SvelteKit supports it natively 😉 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found