feat: use serialize-javascript

This commit is contained in:
DIYgod
2023-04-19 11:39:58 +01:00
parent 9f0ef037bc
commit 8aefa782b5
3 changed files with 14 additions and 2 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { useTranslation } from "next-i18next"
import Head from "next/head"
import serialize from "serialize-javascript"
import { getSiteLink } from "~/lib/helpers"
import { Note, Profile } from "~/lib/types"
@@ -17,7 +18,7 @@ export const SitePage: React.FC<{
function addPageJsonLd() {
return {
__html: JSON.stringify({
__html: serialize({
"@context": "https://schema.org",
"@type": "BlogPosting",
headline: page?.title,