svelte-sitemap
svelte-sitemap copied to clipboard
Cloudflare Pages solution
Wanted to share how to get this working with Cloudflare Pages successfully.
- Use
import adapter from '@sveltejs/adapter-cloudflare';
instead ofadapter-auto
- Add the following within the kit property within
svelte.config.js
adapter: adapter({
routes: {
include: ['/*'],
exclude: ['<all>']
}
})
- In package.json, use
"postbuild": "npx svelte-sitemap --out-dir .svelte-kit/cloudflare --domain https://example.com --debug"