De-duplication of meta tags in head
See original GitHub issueIs your feature request related to a problem? Please describe.
If you declare tags in the _layout.svelte
, and then declare the same tag in a page’s <svelte:head>
, the tags are appended.
This is fine for some cases, but if I want a global meta tag across the whole site, and then specific meta tags for specific pages, I can’t do it, because in those pages I get both tags.
Describe the solution you’d like
If I was able to declare a unique
attribute on a tag, which indicated to the child component that this tag should be replaced, and was not in addition to the tag from _layout
, this would be ideal.
Describe alternatives you’ve considered Another alternative is that we can define an ID on meta tags, which would have the same purpose. The newest tag would be used for the head, and the old one replaced.
How important is this feature to you? Very High - it makes SEO really very difficult to get right with Sapper / Svelte.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:16 (6 by maintainers)
This needs to be fixed. React-Helmet overrides as per the deepest tag in the hierarchy.
this needs to be fixed: Svelte needs a way to be able de-duplicate meta headers
fyi: https://nextjs.org/docs/api-reference/next/head