The-DevOps-Daily/devops-daily

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

開放

#536 建立於 2025年12月2日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (392 個分叉)github user discovery
enhancementgood first issuehacktoberfest

倉庫指標

星標
 (1,087 顆星)
PR 合併指標
 (平均合併 1天 23小時) (30 天內合併 82 個 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 data
  • lib/schema.ts - New schema generation utilities
  • components/structured-data.tsx - Reusable component

貢獻者指南