Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referencing the sitemap.xml in a Netlify build #43

Open
jenseo opened this issue May 2, 2023 · 1 comment
Open

Referencing the sitemap.xml in a Netlify build #43

jenseo opened this issue May 2, 2023 · 1 comment

Comments

@jenseo
Copy link

jenseo commented May 2, 2023

Hey there,
maybe I'm really stupid here but I'm quite new to Sveltekit and has struggled with getting this plugin to work on a Netlify deploy. It get's added correctly to the build folder, which I can also see when I download the deploy from Netlify, but when visiting the mysite.com/sitemap.xml url, I get a 404 and I interpret it like Sveltekit expects a route, but nothing found.

Do I need to exclude the sitemap from the routes somehow?

I've seen some other solutions online where people create their own loader and custom build function for the sitemap which I could do of course, but I was under the impression this was not needed for this plugin? Or how are people actually being able to "visit" their sitemap without Sveltekit interfering and trying to render a route there?

Thanks!

// Jens.

@thepersonthatexists
Copy link

This plugin states it is built for the static adapter, described here. Static websites allow access to all files by default, thus not requiring a route. It sounds like you are likely using a different adapter on Netlify, causing the issue. If the sitemap is working as desired, you can simply add a route and include the sitemap in the +page.svelte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants