Fix double canonical tag
· Updated on
1 minute read
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.sveltealways emit canonical, defaulting toPROJECT_URL + pathnamewhenpageMeta.canonicalis not set
Read next
