Adding JSON LD script to metadata elements #81066
IgorZanellaDev
started this conversation in
Ideas
Replies: 2 comments
-
Related; #56420 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Did no one check this? It's practically done 😐 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
<head>
.Non-Goals
No response
Background
I need to insert the structured data with
<script type="application/ld+json">
in the head, but usually, the structured data is taken from the backend, so it's declared inpage.tsx
files and not inlayout.tsx
files. For SEO it's better if inserted in<head>
. The current alternative is to insert it in the body, but maybe it couldn't be taken from all the search engines.Proposal
I would like to add a jsonLD property in metadata which supports arrays, objects, and strings, and add that content to a
<script type="application/ld+json">
. I think it's quite simple and I already did it in a fork.What do you think about that?
Beta Was this translation helpful? Give feedback.
All reactions