用途
Schema Patterns 是一个结构化数据标记模式技能,目标是为获客型网站(lead generation sites)提供完整的 Schema.org 标记方案,以最大化搜索结果中的富摘要(rich snippet)可见性。通过实现结构化数据,可启用知识面板、FAQ 折叠面板、星级评分等富 SERP 特性,从而提升点击率。
核心规则
- 每个页面只使用一个主 schema——根节点为 LocalBusiness 或 Organization。
- 嵌套相关 schema——例如 Reviews 嵌套在 LocalBusiness 内,而非独立存在。
- 始终验证——部署前使用 Google Rich Results Test 测试。
- 与可见内容一致——schema 必须反映用户在页面上看到的内容。
- 保持更新——营业时间、价格、评论必须为最新。
- 使用绝对 URL——所有图片和链接 URL 必须为绝对地址,不能用相对地址。
- 遵循 Google 要求——检查每种 schema 类型的必填字段。
- 不得虚构内容——只使用真实、可验证的评论和评分。
- 在生产环境测试——部署后使用 Search Console 验证。
- 优先处理 P0 schema——获客场景先做 LocalBusiness 和 FAQPage。
Schema 优先级(面向获客)
| 优先级 | Schema 类型 | 富结果 | 页面类型 |
|---|---|---|---|
| P0 | LocalBusiness | 知识面板、地图 | 所有页面 |
| P0 | FAQPage | SERP 中的 FAQ 折叠面板 | FAQ 区块 |
| P1 | Service | 服务列表 | 服务页面 |
| P1 | BreadcrumbList | 面包屑路径 | 内页 |
| P1 | AggregateRating | 星级评分 | 业务页面 |
| P2 | HowTo | 分步卡片 | 指南内容 |
| P2 | Article | 文章卡片 | 博客文章 |
| P3 | VideoObject | 视频缩略图 | 视频内容 |
| P3 | Product | 产品卡片 | 产品页面 |
使用方式(快速上手)
- 在基础布局(所有页面)中添加 LocalBusiness schema。
- 在含 FAQ 区块的页面添加 FAQPage schema。
- 在服务专属页面添加 Service schema。
- 在所有内页添加 BreadcrumbList schema。
- 使用 Google Rich Results Test 验证所有 schema。
- 在 Search Console 中监控 schema 错误。
- 定期更新业务信息(营业时间、价格)。
使用示例
资料提供了 Astro 布局示例代码:
---
// src/layouts/BaseLayout.astro
import LocalBusinessSchema from '@/components/schema/LocalBusinessSchema.astro';
import BreadcrumbSchema from '@/components/schema/BreadcrumbSchema.astro';
const breadcrumbs = getBreadcrumbs(Astro.url.pathname);
---
<html>
<head>
<LocalBusinessSchema {...siteConfig.business} />
{breadcrumbs.length > 1 && <BreadcrumbSchema items={breadcrumbs} />}
</head>
<body>
<slot />
</body>
</html>
完整的多 schema 示例参见 references/supporting-schemas.md。
参考资料
技能内实现文件包括:LocalBusiness 与 Service Schema、FAQ 与 HowTo Schema、Article 与 VideoObject Schema、支撑类 Schema(BreadcrumbList、Review、WebSite 及组合示例)、验证与测试(验证代码、测试工具、常见错误)。
外部资源包括:Google Rich Results Test(主要验证工具)、Schema.org Validator(官方 schema 验证器)、Google Search Central(schema 指南)、Schema.org 文档(完整 schema 参考)。
禁止事项
- 为页面上不可见的内容添加 schema。
- 使用虚假评论或评分。
- 使用过时的业务信息(营业时间、价格、电话)。
- 同一页面存在多个冲突的主 schema。
- 在 schema 值中堆砌关键词。
- 添加只对 schema 可见、用户不可见的隐藏内容。
- 在 schema 标记中使用相对 URL。
完成标准(Definition of Done)
- 所有页面已实现 LocalBusiness schema。
- FAQ 区块已添加 FAQPage schema。
- 所有服务页面已添加 Service schema。
- 所有内页已添加 BreadcrumbList。
- 博客文章已添加 Article schema。
- 所有 schema 通过 Google Rich Results Test 验证(零错误)。
- Google Search Console 中无 schema 错误。
- schema 内容与页面可见内容一致。
- 业务信息(营业时间、价格、联系方式)为最新且准确。
- 所有图片和链接 URL 均为绝对地址。