fix: ld json serialization

This commit is contained in:
Timothy Lin 2023-08-11 18:56:35 +08:00
parent 5226bfad9a
commit 78e47a210e

View File

@ -116,9 +116,10 @@ export default async function Page({ params }: { params: { slug: string[] } }) {
</div>
) : (
<>
<script type="application/ld+json" suppressHydrationWarning>
{JSON.stringify(jsonLd)}
</script>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
<Layout content={mainContent} authorDetails={authorDetails} next={next} prev={prev}>
<MDXLayoutRenderer code={post.body.code} components={components} toc={post.toc} />
</Layout>