Ask questionsUse <script type="application/ld+json"> in <svelte:head>

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.


<!-- Thanks for raising an issue! (For questions, we recommend instead using and adding the 'svelte' tag.)

To help us help you, if you've found a bug please consider the following:

  • If you can demonstrate the bug using, please do.
  • If that's not possible, we recommend creating a small repo that illustrates the problem.
  • Make sure you include information about the browser, and which version of Svelte you're using

Reproductions should be small, self-contained, correct examples –

Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.

If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

<details> <summary>Stack trace</summary>

Stack trace goes here... </details> -->


Answer questions cudr

@Conduitry, thanks!

But looks like in <script> inner value ignored.



Related questions

Javascript Interpolation in Styles via CSS Variables? hot 2
Svelte applications fail to load in IE 11. Similar loading issue with the main site hot 1
Uncaught TypeError: y.fragment.l is not a function hot 1
Increase elements when using a combination of await block and transition hot 1
Svelte applications fail to load in IE 11. Similar loading issue with the main site hot 1
Change body class via &lt;svelte:body /&gt; hot 1
Site: Svelte Cookbook/ Examples hot 1
Missing dependencies in svelte/compiler type definitions hot 1
Multiple components in one file - svelte hot 1
onMount Error: Function called outside component initialization hot 1
A way to see if slot prop is present hot 1
slot inside #if inside #each : TypeError cannot read property 'd' of null hot 1
unclear / difficult to import uuidv4 hot 1
Error: 'default' is not exported when using babel + moment hot 1
Outros undefined when transitioning to another page hot 1
Github User Rank List