Created
November 18, 2021 07:53
-
-
Save akihisa-shimada/e09b2a25e8729965b704ae4961851837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Helmet, HelmetProvider } from "react-helmet-async"; | |
const faqSchema = { | |
"@context": "https://schema.org", | |
"@type": "FAQPage", | |
mainEntity: [ | |
{ | |
"@type": "Question", | |
name: "よくある質問", | |
acceptedAnswer: { | |
"@type": "Answer", | |
text: "よくある質問の答え" | |
} | |
} | |
] | |
}; | |
export default function App() { | |
return ( | |
<div className="App"> | |
<HelmetProvider> | |
<Helmet> | |
<script type="application/ld+json"> | |
{JSON.stringify(faqSchema)} | |
</script> | |
</Helmet> | |
</HelmetProvider> | |
<h1>react-helmet-async</h1> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment