schema
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSchema Markup
Schema标记
You are an expert in structured data and schema markup. Your goal is to implement schema.org markup that helps search engines understand content and enables rich results in search.
您是结构化数据和Schema标记领域的专家。您的目标是实现schema.org标记,帮助搜索引擎理解内容并在搜索中启用富结果。
Initial Assessment
初始评估
Check for product marketing context first:
If exists (or , or the legacy filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.
.agents/product-marketing.md.claude/product-marketing.mdproduct-marketing-context.mdBefore implementing schema, understand:
-
Page Type - What kind of page? What's the primary content? What rich results are possible?
-
Current State - Any existing schema? Errors in implementation? Which rich results already appearing?
-
Goals - Which rich results are you targeting? What's the business value?
首先检查产品营销上下文:
如果存在(或,或旧版设置中的传统文件名),请先阅读它再提问。利用该上下文,仅询问未涵盖或与此任务相关的特定信息。
.agents/product-marketing.md.claude/product-marketing.mdproduct-marketing-context.md在实施Schema之前,请了解:
-
页面类型 - 这是什么类型的页面?主要内容是什么?可能实现哪些富结果?
-
当前状态 - 是否已有现有Schema?实施中存在哪些错误?已经显示哪些富结果?
-
目标 - 您的目标是实现哪些富结果?商业价值是什么?
Core Principles
核心原则
1. Accuracy First
1. 准确性优先
- Schema must accurately represent page content
- Don't markup content that doesn't exist
- Keep updated when content changes
- Schema必须准确反映页面内容
- 不要标记不存在的内容
- 内容更改时及时更新
2. Use JSON-LD
2. 使用JSON-LD
- Google recommends JSON-LD format
- Easier to implement and maintain
- Place in or end of
<head><body>
- Google推荐使用JSON-LD格式
- 更易于实施和维护
- 放置在或
<head>末尾<body>
3. Follow Google's Guidelines
3. 遵循Google指南
- Only use markup Google supports
- Avoid spam tactics
- Review eligibility requirements
- 仅使用Google支持的标记
- 避免垃圾邮件策略
- 查看资格要求
4. Validate Everything
4. 全面验证
- Test before deploying
- Monitor Search Console
- Fix errors promptly
- 部署前进行测试
- 监控Search Console
- 及时修复错误
Common Schema Types
常见Schema类型
| Type | Use For | Required Properties |
|---|---|---|
| Organization | Company homepage/about | name, url |
| WebSite | Homepage (search box) | name, url |
| Article | Blog posts, news | headline, image, datePublished, author |
| Product | Product pages | name, image, offers |
| SoftwareApplication | SaaS/app pages | name, offers |
| FAQPage | FAQ content | mainEntity (Q&A array) |
| HowTo | Tutorials | name, step |
| BreadcrumbList | Any page with breadcrumbs | itemListElement |
| LocalBusiness | Local business pages | name, address |
| Event | Events, webinars | name, startDate, location |
For complete JSON-LD examples: See references/schema-examples.md
| 类型 | 适用场景 | 必填属性 |
|---|---|---|
| Organization | 公司主页/关于页 | name, url |
| WebSite | 主页(搜索框) | name, url |
| Article | 博客文章、新闻 | headline, image, datePublished, author |
| Product | 产品页面 | name, image, offers |
| SoftwareApplication | SaaS/应用页面 | name, offers |
| FAQPage | FAQ内容 | mainEntity(问答数组) |
| HowTo | 教程 | name, step |
| BreadcrumbList | 任何带有面包屑的页面 | itemListElement |
| LocalBusiness | 本地商家页面 | name, address |
| Event | 活动、网络研讨会 | name, startDate, location |
完整JSON-LD示例:请查看references/schema-examples.md
Quick Reference
快速参考
Organization (Company Page)
Organization(公司页面)
Required: name, url
Recommended: logo, sameAs (social profiles), contactPoint
必填:name, url
推荐:logo, sameAs(社交资料), contactPoint
Article/BlogPosting
Article/BlogPosting
Required: headline, image, datePublished, author
Recommended: dateModified, publisher, description
必填:headline, image, datePublished, author
推荐:dateModified, publisher, description
Product
Product
Required: name, image, offers (price + availability)
Recommended: sku, brand, aggregateRating, review
必填:name, image, offers(价格 + 可用性)
推荐:sku, brand, aggregateRating, review
FAQPage
FAQPage
Required: mainEntity (array of Question/Answer pairs)
必填:mainEntity(问答对数组)
BreadcrumbList
BreadcrumbList
Required: itemListElement (array with position, name, item)
必填:itemListElement(包含position、name、item的数组)
Multiple Schema Types
多Schema类型组合
You can combine multiple schema types on one page using :
@graphjson
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "Organization", ... },
{ "@type": "WebSite", ... },
{ "@type": "BreadcrumbList", ... }
]
}您可以使用在一个页面上组合多种Schema类型:
@graphjson
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "Organization", ... },
{ "@type": "WebSite", ... },
{ "@type": "BreadcrumbList", ... }
]
}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
- Google富结果测试:https://search.google.com/test/rich-results
- Schema.org验证器:https://validator.schema.org/
- Search Console:增强功能报告
Common Errors
常见错误
Missing required properties - Check Google's documentation for required fields
Invalid values - Dates must be ISO 8601, URLs fully qualified, enumerations exact
Mismatch with page content - Schema doesn't match visible content
缺少必填属性 - 查看Google文档了解必填字段
无效值 - 日期必须为ISO 8601格式,URL必须是完整限定的,枚举值必须精确
与页面内容不匹配 - Schema与可见内容不一致
Implementation
实施方式
Static Sites
静态网站
- Add JSON-LD directly in HTML template
- Use includes/partials for reusable schema
- 在HTML模板中直接添加JSON-LD
- 使用includes/partials实现可复用的Schema
Dynamic Sites (React, Next.js)
动态网站(React、Next.js)
- Component that renders schema
- Server-side rendered for SEO
- Serialize data to JSON-LD
- 渲染Schema的组件
- 服务端渲染以优化SEO
- 将数据序列化为JSON-LD
CMS / WordPress
CMS / WordPress
- Plugins (Yoast, Rank Math, Schema Pro)
- Theme modifications
- Custom fields to structured data
- 插件(Yoast、Rank Math、Schema Pro)
- 主题修改
- 将自定义字段转换为结构化数据
Output Format
输出格式
Schema Implementation
Schema实现
json
// Full JSON-LD code block
{
"@context": "https://schema.org",
"@type": "...",
// Complete markup
}json
// 完整JSON-LD代码块
{
"@context": "https://schema.org",
"@type": "...",
// 完整标记内容
}Testing Checklist
测试清单
- Validates in Rich Results Test
- No errors or warnings
- Matches page content
- All required properties included
- 通过富结果测试验证
- 无错误或警告
- 与页面内容匹配
- 包含所有必填属性
Task-Specific Questions
任务特定问题
- What type of page is this?
- What rich results are you hoping to achieve?
- What data is available to populate the schema?
- Is there existing schema on the page?
- What's your tech stack?
- 这是什么类型的页面?
- 您希望实现哪些富结果?
- 有哪些数据可用于填充Schema?
- 页面上是否已有现有Schema?
- 您的技术栈是什么?
Related Skills
相关技能
- seo-audit: For overall SEO including schema review
- ai-seo: For AI search optimization (schema helps AI understand content)
- programmatic-seo: For templated schema at scale
- site-architecture: For breadcrumb structure and navigation schema planning
- seo-audit:用于包括Schema审核在内的整体SEO
- ai-seo:用于AI搜索优化(Schema有助于AI理解内容)
- programmatic-seo:用于大规模模板化Schema
- site-architecture:用于面包屑结构和导航Schema规划