← 返回
效率工具 中文

Schema Markup

Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.
添加、修复或优化架构标记和结构化数据。当用户提及架构标记、结构化数据、JSON-LD、富媒体搜索结果、schema.org、FAQ架构、产品架构、评价架构或面包屑架构时使用。
wpank
效率工具 clawhub v0.1.0 1 版本 99841.7 Key: 无需
★ 0
Stars
📥 1,892
下载
💾 36
安装
1
版本
#latest

概述

Schema Markup

Implement schema.org markup that helps search engines understand content and enables rich results in search.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install schema-markup

When to Use

  • Adding structured data to new or existing pages
  • Fixing schema validation errors
  • Optimizing for specific rich results (FAQ, product, article)
  • Implementing JSON-LD in React/Next.js applications
  • Auditing existing schema markup

Initial Assessment

Before implementing schema, understand:

  1. Page Type — What kind of page? What's the primary content? What rich results are possible?
  2. Current State — Any existing schema? Errors? Which rich results already appearing?
  3. Goals — Which rich results are you targeting? What's the business value?

Core Principles

1. Accuracy First

  • Schema must accurately represent page content
  • Don't markup content that doesn't exist on the page
  • Keep updated when content changes

2. Use JSON-LD

  • Google recommends JSON-LD format
  • Easier to implement and maintain than microdata or RDFa
  • Place in or before

3. Follow Google's Guidelines

  • Only use markup Google supports for rich results
  • Avoid spam tactics
  • Review eligibility requirements for each type

4. Validate Everything

  • Test before deploying
  • Monitor Search Console enhancement reports
  • Fix errors promptly

Common Schema Types

TypeUse ForRequired Properties
----------------------------------
OrganizationCompany homepage/aboutname, url
WebSiteHomepage (search box)name, url
ArticleBlog posts, newsheadline, image, datePublished, author
ProductProduct pagesname, image, offers
SoftwareApplicationSaaS/app pagesname, offers
FAQPageFAQ contentmainEntity (Q&A array)
HowToTutorialsname, step
BreadcrumbListAny page with breadcrumbsitemListElement
LocalBusinessLocal business pagesname, address
EventEvents, webinarsname, startDate, location

For complete JSON-LD examples with required/recommended field annotations: See references/schema-examples.md

Quick Reference

Organization (Company Page)

Required: name, url

Recommended: logo, sameAs (social profiles), contactPoint

Article/BlogPosting

Required: headline, image, datePublished, author

Recommended: dateModified, publisher, description

Product

Required: name, image, offers (price + availability)

Recommended: sku, brand, aggregateRating, review

FAQPage

Required: mainEntity (array of Question/Answer pairs)

BreadcrumbList

Required: itemListElement (array with position, name, item)

Multiple Schema Types

Combine multiple schema types on one page using @graph:

{
  "@context": "https://schema.org",
  "@graph": [
    { "@type": "Organization", "..." : "..." },
    { "@type": "WebSite", "..." : "..." },
    { "@type": "BreadcrumbList", "..." : "..." }
  ]
}

Use @id to create referenceable entities — define once, reference elsewhere with { "@id": "..." }.

Validation and Testing

Tools

  • Google Rich Results Test: https://search.google.com/test/rich-results
  • Schema.org Validator: https://validator.schema.org/
  • Search Console: Enhancements reports

Common Errors

ErrorCauseFix
-------------------
Missing required fieldRequired property not includedAdd the missing property
Invalid URLRelative URL or malformedUse fully qualified URLs (https://...)
Invalid date formatNot ISO 8601Use YYYY-MM-DDTHH:MM:SS+00:00
Invalid enum valueWrong enumeration valueUse exact schema.org URLs (e.g., https://schema.org/InStock)
Content mismatchSchema doesn't match visible contentEnsure schema reflects actual page content
Invalid priceCurrency symbol or commas includedUse numeric value only ("149.99")

Implementation

Static Sites

  • Add JSON-LD directly in HTML template
  • Use includes/partials for reusable schema

Dynamic Sites (React, Next.js)

export function JsonLd({ data }: { data: Record<string, unknown> }) {
  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
    />
  );
}

CMS / WordPress

  • Plugins: Yoast, Rank Math, Schema Pro
  • Theme modifications for custom types
  • Custom fields mapped to structured data

Testing Checklist

  • [ ] Validates in Rich Results Test with no errors
  • [ ] No warnings for recommended properties
  • [ ] Schema content matches visible page content
  • [ ] All required properties included for each type
  • [ ] URLs are fully qualified
  • [ ] Dates are ISO 8601 format
  • [ ] Prices are numeric without currency symbols

Task-Specific Questions

Before implementing, gather answers to:

  1. What type of page is this? (product, article, FAQ, local business)
  2. What rich results are you targeting? (FAQ dropdown, product stars, breadcrumbs)
  3. What data is available to populate the schema? (prices, ratings, dates)
  4. Is there existing schema on the page? (check with Rich Results Test first)
  5. What's your tech stack? (static HTML, React/Next.js, CMS/WordPress)

Implementation Workflow

  1. Identify page types — map your site's pages to schema types
  2. Start with homepage — Organization + WebSite schema
  3. Add per-page schema — Article for blog, Product for shop, etc.
  4. Add BreadcrumbList — every page with navigation breadcrumbs
  5. Validate each page — Rich Results Test before and after
  6. Monitor Search Console — check enhancement reports weekly after launch

NEVER Do

  1. NEVER add schema for content that doesn't exist on the page — this violates Google's guidelines and risks penalties
  2. NEVER use microdata or RDFa when JSON-LD is an option — JSON-LD is easier to maintain and Google's recommended format
  3. NEVER hardcode schema that should be dynamic — product prices, availability, and ratings must reflect current data
  4. NEVER skip validation before deploying — invalid schema is worse than no schema; it wastes crawl budget
  5. NEVER mark up every page identically — each page type needs its own appropriate schema types
  6. NEVER ignore Search Console errors — schema errors can cause rich results to disappear entirely

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-28 22:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Code Review

wpank
涵盖安全、性能、可维护性、正确性和测试的系统化代码审查模式,包含严重等级、结构化反馈指南、审查流程及需避免的反模式。适用于审查 PR、建立审查标准或提升审查质量。
★ 31 📥 17,112
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 439 📥 147,690
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,856