Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 485b477

Browse files
committed
Show comment JSON on posts and pages
1 parent bec1cd5 commit 485b477

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pages/[...slug].js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export default function Page({post}) {
3030
__html: JSON.stringify(post?.blocks ?? [])
3131
}}
3232
/>
33+
<div
34+
dangerouslySetInnerHTML={{
35+
__html: JSON.stringify(post?.comments ?? [])
36+
}}
37+
/>
3338
</article>
3439
</section>
3540
{post?.slug === 'form-demo' && (

pages/blog/[[...slug]].js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ export default function BlogPost({post, archive, posts, pagination}) {
7070
__html: JSON.stringify(post?.blocks ?? [])
7171
}}
7272
/>
73+
<div
74+
dangerouslySetInnerHTML={{
75+
__html: JSON.stringify(post?.comments ?? [])
76+
}}
77+
/>
7378
</article>
7479
</section>
7580
</div>

0 commit comments

Comments
 (0)