| import React from 'react'; | |
| import Head from '@docusaurus/Head'; | |
| export default function FAQSchema({ faqs }) { | |
| const schema = { | |
| "@context": "https://schema.org", | |
| "@type": "FAQPage", | |
| "mainEntity": faqs.map(faq => ({ | |
| "@type": "Question", | |
| "name": faq.question, | |
| "acceptedAnswer": { | |
| "@type": "Answer", | |
| "text": faq.answer | |
| } | |
| })) | |
| }; | |
| return ( | |
| <Head> | |
| <script type="application/ld+json"> | |
| {JSON.stringify(schema)} | |
| </script> | |
| </Head> | |
| ); | |
| } |