One thing to keep in mind is if you place these `<meta>` tags directly in a page then they'll get duplicated on each page visit. This is because Svelte is updating the DOM for the page, but seems to not consider the `<svelte:head>` as idempotent as other elements in the DOM. The fix is to move all uses of `<svelte:head>` into a component so Svelte properly updates them on page changes.
The code for `OGPreview.svelte` does this, which means you *do not* put it into a `<svelte:head>`. Instead you do this:
The code for `SEOTricks.svelte` does this, which means you *do not* put it into a `<svelte:head>`. Instead you do this:
<pre><codedata-language="javascript">
<OGPreview og={ og } twitter={ twitter} />
<SEOTricks og={ og } twitter={ twitter} />
</code></pre>
Then `OGPreview` does everything for you. If you run into this bug in your own development use the `client/components/HeaderOnce.svelte` component like this:
Then `SEOTricks` does everything for you. If you run into this bug in your own development use the `client/components/HeaderOnce.svelte` component like this: