结构化数据指南
文章 / 博客帖子
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "如何优化您的网站",
"datePublished": "2024-01-15",
"dateModified": "2024-02-01",
"author": {
"@type": "Person",
"name": "张三",
"url": "https://example.com/author/zhangsan"
},
"publisher": {
"@type": "Organization",
"name": "示例公司",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
},
"image": "https://example.com/article-image.jpg",
"description": "网站优化完整指南。"
}
</script>
产品
{
"@context": "https://schema.org",
"@type": "Product",
"name": "无线键盘",
"image": "https://example.com/keyboard.jpg",
"description": "带背光的紧凑型无线键盘。",
"brand": { "@type": "Brand", "name": "TechBrand" },
"sku": "WK-1234",
"offers": {
"@type": "Offer",
"url": "https://example.com/keyboard",
"priceCurrency": "CNY",
"price": "399",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "124"
}
}
FAQ 页面
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "什么是结构化数据?",
"acceptedAnswer": {
"@type": "Answer",
"text": "结构化数据是一种标准化格式,用于提供页面信息并对页面内容进行分类。"
}
},
{
"@type": "Question",
"name": "如何测试结构化数据?",
"acceptedAnswer": {
"@type": "Answer",
"text": "使用 Google 富媒体摘要测试工具:https://search.google.com/test/rich-results"
}
}
]
}
面包屑导航
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "首页", "item": "https://example.com" },
{ "@type": "ListItem", "position": 2, "name": "工具", "item": "https://example.com/tools" },
{ "@type": "ListItem", "position": 3, "name": "SEO 指南" }
]
}
支持的富媒体摘要类型
| 类型 | Schema.org 类型 | 富媒体效果 |
|---|---|---|
| 文章 | Article, NewsArticle | 头条新闻、缩略图 |
| 产品 | Product | 价格、库存、评分 |
| 常见问题 | FAQPage | 搜索结果中展开 Q&A |
| 操作指南 | HowTo | 步骤展示在搜索结果 |
| 食谱 | Recipe | 烹饪时间、评分、图片 |
| 本地商家 | LocalBusiness | 地图、营业时间、电话 |
| 活动 | Event | 日期、地点、购票链接 |
| 招聘职位 | JobPosting | 薪资、公司、申请链接 |