src/routes/+layout.svelte:28 unconditionally emits <link rel="canonical"> from PROJECT_URL + pathname, while src/lib/Meta.svelte:84-86 also emits one when pageMeta.canonical is set. Pages overriding canonical end up with two tags.

Tasks

  • Remove the unconditional canonical from +layout.svelte
  • Have Meta.svelte always emit canonical, defaulting to PROJECT_URL + pathname when pageMeta.canonical is not set

One canonical, one source

Delegate canonical resolution to Meta only

A static site template built with SvelteKit.

Sveleton, 2025