Skip to content

Instantly share code, notes, and snippets.

@akihisa-shimada
Created November 18, 2021 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akihisa-shimada/e09b2a25e8729965b704ae4961851837 to your computer and use it in GitHub Desktop.
Save akihisa-shimada/e09b2a25e8729965b704ae4961851837 to your computer and use it in GitHub Desktop.
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