NewsArticle(新闻文章)
新闻网站应使用这种类型。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "React 19 发布,引入新的编译器",
"alternativeHeadline": "React 官方发布最新版本",
"image": [
"https://example.com/react-19-news.jpg"
],
"datePublished": "2025-12-01T12:00:00+08:00",
"dateModified": "2025-12-01T14:00:00+08:00",
"author": {
"@type": "Person",
"name": "科技记者",
"url": "https://example.com/authors/reporter"
},
"publisher": {
"@type": "Organization",
"name": "技术新闻网",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
},
"description": "React 19 版本发布,包含新的编译器和性能优化"
}
</script>
Article(文章)
最常用的 Schema 类型,适合博客、新闻、教程等。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"@id": "https://example.com/article/123",
"mainEntity": {
"@type": "Article",
"headline": "完整的 Python 异步编程指南",
"alternativeHeadline": "深度讲解 asyncio 和 async/await",
"image": [
"https://example.com/images/python-async.jpg"
],
"datePublished": "2025-12-08",
"dateModified": "2025-12-10",
"author": [
{
"@type": "Person",
"name": "张三",
"url": "https://example.com/authors/zhangsan"
}
],
"publisher": {
"@type": "Organization",
"name": "HTMLPAGE",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
},
"description": "详细讲解 Python asyncio 库的使用...",
"articleBody": "文章的完整内容...",
"wordCount": 2500,
"articleSection": "科技",
"keywords": "Python, async, asyncio, 异步编程"
}
}
</script>
Product(产品)
电商网站必需,能显示价格、评分、库存等信息。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "React 高级开发课程",
"description": "系统学习 React 高级模式和最佳实践",
"image": "https://example.com/product/react-course.jpg",
"brand": {
"@type": "Brand",
"name": "HTMLPAGE 学院"
},
"offers": {
"@type": "Offer",
"url": "https://example.com/products/react-course",
"priceCurrency": "CNY",
"price": "599",
"priceValidUntil": "2025-12-31",
"availability": "https://schema.org/InStock",
"inventoryLevel": {
"@type": "QuantitativeValue",
"value": "100"
}
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": 427,
"bestRating": "5",
"worstRating": "1"
},
"review": [
{
"@type": "Review",
"author": {
"@type": "Person",
"name": "李四"
},
"datePublished": "2025-11-15",
"reviewRating": {
"@type": "Rating",
"ratingValue": "5"
},
"reviewBody": "非常实用的课程,讲解深入浅出"
}
]
}
</script>
Event(活动)
适合会议、工作坊、网络研讨会等。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Event",
"name": "2025 年 React 技术峰会",
"description": "年度最大的 React 开发者聚会",
"url": "https://example.com/events/react-summit-2025",
"image": "https://example.com/events/react-summit.jpg",
"startDate": "2025-12-15T09:00:00+08:00",
"endDate": "2025-12-17T17:00:00+08:00",
"eventStatus": "https://schema.org/EventScheduled",
"eventAttendanceMode": "https://schema.org/HybridEventAttendanceMode",
"location": [
{
"@type": "Place",
"name": "北京国际会议中心",
"address": {
"@type": "PostalAddress",
"streetAddress": "朝阳区建国路 1 号",
"addressLocality": "北京",
"postalCode": "100010",
"addressCountry": "CN"
}
},
{
"@type": "VirtualLocation",
"url": "https://example.com/live-stream"
}
],
"organizer": {
"@type": "Organization",
"name": "HTMLPAGE 社区",
"url": "https://example.com"
},
"offers": {
"@type": "Offer",
"url": "https://example.com/events/react-summit-2025/tickets",
"price": "899",
"priceCurrency": "CNY",
"availability": "https://schema.org/InStock",
"validFrom": "2025-11-01T00:00:00+08:00"
},
"performer": [
{
"@type": "Person",
"name": "尤雨溪"
},
{
"@type": "Person",
"name": "Dan Abramov"
}
]
}
</script>
Recipe(食谱)
食品博客必需。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Recipe",
"name": "番茄鸡蛋面",
"description": "简单易做的经典家常面食",
"image": [
"https://example.com/recipe/tomato-egg-noodles.jpg"
],
"author": {
"@type": "Person",
"name": "美食博主"
},
"prepTime": "PT5M",
"cookTime": "PT15M",
"totalTime": "PT20M",
"recipeYield": "2",
"recipeCategory": "Breakfast",
"recipeCuisine": "Chinese",
"recipeIngredient": [
"2 个番茄",
"2 个鸡蛋",
"200g 面条",
"盐、油、葱"
],
"recipeInstructions": [
{
"@type": "HowToStep",
"text": "番茄切块,鸡蛋打散"
},
{
"@type": "HowToStep",
"text": "油热后炒番茄和鸡蛋"
},
{
"@type": "HowToStep",
"text": "煮面条,装盘混合"
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": 89
}
}
</script>
LocalBusiness(本地商业)
适合有实体店铺的业务。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "HTMLPAGE 线下培训中心",
"image": "https://example.com/office.jpg",
"description": "专业的前端开发培训机构",
"url": "https://example.com",
"telephone": "+86-10-12345678",
"email": "contact@example.com",
"address": {
"@type": "PostalAddress",
"streetAddress": "朝阳区建国路 1 号",
"addressLocality": "北京",
"postalCode": "100010",
"addressCountry": "CN"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "39.9042",
"longitude": "116.4074"
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "09:00",
"closes": "18:00"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Saturday"],
"opens": "10:00",
"closes": "16:00"
}
],
"sameAs": [
"https://weibo.com/htmlpage",
"https://wechat.com/htmlpage"
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"reviewCount": 156
}
}
</script>