nuxt-x-schema
QAPage
Schema.org QAPage JSON-LD component for community Q&A and forum-style structured data.
QAPage
The XSchemaQAPage component injects a <script type="application/ld+json"> tag for Q&A page structured data. No visible output — SEO only.
Components
<XSchemaQAPage />
Use on community Q&A pages, forum threads, or support pages where one question has an accepted answer. Enables rich results with answers shown directly in Google Search.
<XSchemaQAPage
:items="[
{
label: 'What is the capital of France?',
content: 'Paris',
answerAuthor: 'Expert User',
upvoteCount: 42
}
]"
/>
Props
| Prop | Type | Required | Description |
|---|---|---|---|
items | QAItem[] | Yes | Array of Q&A items. Each item: label/question/name for question; content/answer/text for accepted answer; optional answerAuthor, answerDate, suggestedAnswers, upvoteCount, answerCount, dateCreated |
pageTitle | String | No | Page name |
pageDescription | String | No | Page description |
datePublished | String | No | ISO 8601 publish date |
dateModified | String | No | ISO 8601 modified date |
author | String | Person | No | Page author |
AI Context
component: XSchemaQAPage
package: "@xenterprises/nuxt-x-schema"
output: JSON-LD script tag in <head>
use-when: Adding QAPage structured data on community Q&A or forum pages with accepted answers
place: In page-level components (pages/ or layouts/), NOT in shared headers
notes:
- Renderless component — no visible DOM output; purely SEO metadata
- Injects JSON-LD server-side via useHead — SSR-safe, visible to crawlers on first paint
- QA items accept label/question/name for question and content/answer/text for accepted answer
