
The sveltekit-sitemap library is designed to assist in generating and maintaining dynamic sitemap.xml and robots.txt files for SvelteKit apps. It combines a Vite plugin and a Svelte-kit hook to achieve this functionality. The plugin watches the routes folder and generates a TypeScript representation of it, while the hook delivers sitemap.xml and robots.txt responses based on params and the TypeScript sitemap. It is important to note that this library does not generate a static sitemap at build time, but rather helps deliver server-side rendered (SSR) sitemaps.
The sveltekit-sitemap library is a useful tool for generating and maintaining dynamic sitemap.xml and robots.txt files for SvelteKit apps. It combines a Vite plugin and a Svelte-kit hook to accomplish this functionality. The plugin watches the routes folder and generates a TypeScript representation of it, while the hook delivers sitemap.xml and robots.txt responses based on params and the TypeScript sitemap. It supports custom routes definitions and robots directives, allowing for flexible configurations.
