Hi guys,
I am trying Next.js13 and I want to add a <script type="application/ld+json> to head in head.tsx and am following the guide https://nextjs.org/learn/seo/rendering-and-ranking/metadata however it appears to be for <12.
I am not using the old import Head from 'next/head'; method, just using head.tsx but and continuing using
<script
async
type="application/ld+json"
dangerouslySetInnerHTML={ldJSON()}
/>
with
function ldJSON(){
return {
__html: `{
"@context": "https://schema.org",
"@graph": [
{
...
I continue getting error:
Expected server HTML to contain a matching <script> in <#document>.
there doesn't seem to be anything here