The-DevOps-Daily/devops-daily

feat: Add structured data (schema.org) for quizzes

オープン

#536 opened on 2025/12/02

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (392 件のフォーク)github user discovery
enhancementgood first issuehacktoberfest

Repository metrics

Stars
 (1,087 個のスター)
PR merge metrics
 (平均マージ 1d 23h) (30d で 82 merged PRs)

説明

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 data
  • lib/schema.ts - New schema generation utilities
  • components/structured-data.tsx - Reusable component

コントリビューターガイド