The-DevOps-Daily/devops-daily
在 GitHub 查看feat: Add structured data (schema.org) for quizzes
Open
#536 建立於 2025年12月2日
enhancementgood first issuehacktoberfest
倉庫指標
- Star
- (1,087 star)
- PR 合併指標
- (PR 指標待抓取)
描述
Description
Add Quiz schema.org structured data to quiz pages for better SEO and rich results in search engines.
Problem
- Quiz pages lack structured data
- Search engines can't identify content as quizzes
- Missing opportunity for rich snippets
- No enhanced search results
Benefits
- Quiz rich results in Google Search
- Better click-through rates from search
- Enhanced visibility in search results
- Educational content recognition
Schema.org Quiz Structure
{
"@context": "https://schema.org",
"@type": "Quiz",
"name": "DevOps Interview Questions Quiz",
"description": "Test your knowledge...",
"educationalLevel": "intermediate",
"typicalAgeRange": "18-",
"hasPart": [
{
"@type": "Question",
"eduQuestionType": "Multiple choice",
"text": "What is...",
"acceptedAnswer": {
"@type": "Answer",
"text": "Correct answer"
}
}
]
}
Acceptance Criteria
- Add Quiz schema to all quiz pages
- Include quiz metadata (title, description, difficulty)
- Add Question schema for each question
- Include correct answers in structured data
- Add to
<head>as JSON-LD - Validate with Google Rich Results Test
- Document schema implementation
- Test with schema.org validator
Files to Modify
app/quizzes/[slug]/page.tsx- Add structured datalib/schema.ts- New schema generation utilitiescomponents/structured-data.tsx- Reusable component