-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use <script type="application/ld+json"> in <svelte:head> #2438
Comments
You could instead do <svelte:head>
<script type='application/ld+json'>{some_json}</script>
</svelte:head> which doesn't have this problem. But I do think that |
@Conduitry, thanks! But looks like in <script> inner value ignored. reproduction: https://v3.svelte.technology/repl?version=3.0.0-beta.28&gist=0337994512de9223053c6f24e34e7d04 |
Ah right, sorry I forgot about that. Non-top-level So, yeah I think using |
Released 3.4.4 with the fix |
It does not work. <script type="application/ld+json">{jsonLd}</script> Any updates? |
OK, here is the correct way to use it: {@html '<script type="application/ld+json">'+ JSON.stringify(jsonLd) + '</script>'} |
Good day!
Have we any solution to use json-ld in svelte:head?
I try insert it as @html string, but it rewrite all other head elements.
reproduction: https://v3.svelte.technology/repl?version=3.0.0-beta.28&gist=0337994512de9223053c6f24e34e7d04
The text was updated successfully, but these errors were encountered: