Skip to content

SEO008 · JSON-LD structured data

Severity: info

Every route must include a <script type="application/ld+json"> JSON-LD block (own or inherited through the layout chain). A missing JSON-LD block is flagged.

JSON-LD structured data lets search engines render rich results (breadcrumbs, articles, products) for the page.

Add a JSON-LD <script> inside <svelte:head> with literal JSON (Svelte emits the script body as-is, so use literal JSON — an interpolation like {JSON.stringify(...)} would be emitted as that literal string and produce invalid JSON-LD):

<svelte:head>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Page title"
}
</script>
</svelte:head>