Svelte static site generation not pre-rendering html or tags

2 weeks ago 24
ARTICLE AD BOX

I've setup a statically generated Sveltekit site per https://svelte.dev/docs/kit/adapter-static. Technically it works. There is a pre-rendered page for everything in the site, even the dynamic content via use of EntryGenerator.

However the statically generated html is not the full html content, nor any of the svelte:head tags I've added for SEO. Instead there's a call to a Promise which then recreates the html and the tags dynamically. This is not quite what I was hoping for from ssg.

Is there a way to at least get the svelte:head stuff pre-generated?

I'm using Svelte v5.0.0, SvelteKit v2.16.0, and adapter-static v3.0.9. Here's my config:

/** @type {import('@sveltejs/kit').Config} */ const config = { extensions: ['.svelte', '.md'], preprocess: [vitePreprocess(), mdsvex(mdsvexOptions)], kit: { adapter: adapter({ fallback: 'index.html', pages: 'build', assets: 'build' }) } };
Read Entire Article