JSON-LD 格式的结构化数据代码有什么作用?
JSON-LD 格式的结构化数据(Schema Markup),它是现代 SEO(搜索引擎优化)中非常重要的一环。简单来说,它的作用是“给搜索引擎看的自我介绍”。Schema.org(由 Google、微软等巨头联合推出的全球性词汇表)定义的格式。
JSON-LD 格式的结构化数据(Schema Markup),它是现代 SEO(搜索引擎优化)中非常重要的一环。简单来说,它的作用是“给搜索引擎看的自我介绍”。
以下是详细的分析、作用说明以及关于全站使用的建议:
JSON-LD格式的GEO/SEO结构化数据代码有什么作用?
JSON-LD格式的GEO/SEO结构化数据使用 Schema.org(由 Google、微软等巨头联合推出的全球性词汇表)定义的格式。
具体作用如下:
明确网站身份:它明确告诉搜索引擎(Google、Bing、百度等):“我是一个网站,我的名字是 {pboot:sitetitle},我的网址是 {pboot:httpurl}”。
增强搜索结果展示(富媒体摘要):虽然仅仅加上这个不一定能立刻获得“富媒体摘要”(如星级评分、面包屑等),但它是基础。对于 WebSite 类型,它主要帮助搜索引擎在搜索结果中正确显示你的网站名称和链接,有时还能辅助生成面包屑导航。
提升理解效率:搜索引擎爬虫抓取网页时,通常是通过分析 HTML 标签来猜测页面内容的。结构化数据直接“告诉”爬虫页面的含义,消除了歧义,让收录更精准。
PbootCMS JSON-LD格式的GEO/SEO结构化数据
以下是一份适配企业官网的完整结构化数据(JSON-LD)模板。你可以直接将这些代码块替换掉对应的 PbootCMS 标签后,放入相应页面的 <head> 或 <body> 底部区域。
1. 首页 (Home)
核心类型: WebSite + Organization
作用: 告诉搜索引擎网站的基本信息以及背后所属的企业实体,建立品牌信任基础
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"name": "{pboot:sitetitle}",
"url": "{pboot:httpurl}",
"potentialAction": {
"@type": "SearchAction",
"target": "{pboot:httpurl}search/keyword/{search_term_string}",
"query-input": "required name=search_term_string"
}
},
{
"@type": "Organization",
"name": "你的公司全称",
"url": "{pboot:httpurl}",
"logo": "{pboot:sitedomain}/logo.png",
"sameAs": [
"https://weibo.com/你的微博ID",
"https://www.zhihu.com/people/你的知乎ID"
],
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+86-400-xxx-xxxx",
"contactType": "customer service"
}
}
]
}
</script>2. 公司简介页 (About Us)
核心类型: AboutPage + Organization
作用: 明确该页面是介绍公司的,并再次强化企业的详细资质信息
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "AboutPage",
"mainEntity": {
"@type": "Organization",
"name": "你的公司全称",
"description": "这里填写公司的简短描述,例如:专注高端仪器研发的高新技术企业...",
"foundingDate": "20xx-xx-xx",
"address": {
"@type": "PostalAddress",
"streetAddress": "具体街道地址",
"addressLocality": "xx市",
"addressRegion": "xx省",
"postalCode": "100000",
"addressCountry": "CN"
}
}
}
</script>3. 产品列表页 (Product List)
核心类型: CollectionPage + BreadcrumbList
作用: 告诉搜索引擎这是一个产品的集合页面,并带上清晰的面包屑导航路径
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "产品中心 - {pboot:sitetitle}",
"description": "{pboot:sitedescription}",
"url": "{pboot:pageurl}",
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "首页",
"item": "{pboot:httpurl}"
},
{
"@type": "ListItem",
"position": 2,
"name": "产品中心"
}
]
}
}
</script>4. 产品详情页 (Product Detail)
核心类型: Product + Offer + BreadcrumbList
作用: 电商与B2B网站的核心。展示价格、库存、评分等信息,极大提升在搜索结果中的点击率
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "{content:title}",
"image": "{content:ico}",
"description": "{content:description}",
"sku": "{content:ext_***}",
"brand": {
"@type": "Brand",
"name": "你的公司品牌名"
},
"offers": {
"@type": "Offer",
"url": "{pboot:pageurl}",
"priceCurrency": "CNY",
"price": "{content:ext_***}",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "首页", "item": "{pboot:httpurl}" },
{ "@type": "ListItem", "position": 2, "name": "产品中心", "item": "{pboot:httpurl}{content:sortlink}" },
{ "@type": "ListItem", "position": 3, "name": "{content:title}" }
]
}
}
</script>5. 新闻列表页 (News List)
核心类型: CollectionPage + BreadcrumbList
作用: 与产品列表页类似,声明这是一个资讯聚合页面。
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "新闻资讯 - {pboot:sitetitle}",
"url": "{pboot:pageurl}",
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "首页", "item": "{pboot:httpurl}" },
{ "@type": "ListItem", "position": 2, "name": "新闻资讯" }
]
}
}
</script>6. 新闻详情页 (News Detail)
核心类型: Article / NewsArticle + BreadcrumbList
作用: 帮助搜索引擎精准识别文章的作者、发布时间及归属机构,利于收录和展现
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{content:title}",
"description": "{content:description}",
"image": "{content:ico}",
"datePublished": "{content:date}",
"dateModified": "{content:date}",
"author": {
"@type": "Organization",
"name": "{pboot:sitetitle}"
},
"publisher": {
"@type": "Organization",
"name": "{pboot:sitetitle}",
"logo": {
"@type": "ImageObject",
"url": "{pboot:sitedomain}/logo.png"
}
},
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "首页", "item": "{pboot:httpurl}" },
{ "@type": "ListItem", "position": 2, "name": "新闻资讯", "item": "{pboot:httpurl}{content:sortlink}" },
{ "@type": "ListItem", "position": 3, "name": "{content:title}" }
]
}
}
</script>7 & 8. 应用列表页与应用详情页 (Application Pages)
说明: “应用案例”或“解决方案”在结构上与新闻非常相似。
应用列表页:直接复用 新闻列表页 的 CollectionPage 模板,修改名称即可。
应用详情页:直接复用 新闻详情页 的 Article 模板。如果该应用页面包含具体的操作步骤,也可以考虑使用 HowTo 类型来增强 AI 抓取效果。
9. 服务页 (Service)
核心类型: Service
作用: 明确企业提供的具体服务项目及其范围
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Service",
"serviceType": "技术服务 / 售后支持 / 定制开发",
"provider": {
"@type": "Organization",
"name": "{pboot:sitetitle}"
},
"areaServed": {
"@type": "Country",
"name": "中国"
},
"description": "这里填写服务的具体描述内容..."
}
</script>10. 联系页 (Contact)
核心类型: ContactPage
作用: 强化本地搜索优化(Local SEO),让搜索引擎快速提取电话、地址等关键联络信息
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ContactPage",
"name": "联系我们 - {pboot:sitetitle}",
"description": "{pboot:sitedescription}",
"mainEntity": {
"@type": "Organization",
"name": "{pboot:sitetitle}",
"telephone": "+86-xxx-xxxxxxxx",
"email": "your@email.com",
"address": {
"@type": "PostalAddress",
"streetAddress": "具体街道门牌号",
"addressLocality": "xx市",
"addressRegion": "xx省",
"addressCountry": "CN"
}
}
}
</script>如何用 HowTo 类型来增强 AI 抓取效果
用 HowTo 类型来增强 AI 抓取效果,简单来说就是给你的网页内容贴上“标准操作说明书”的标签。
在 AI 搜索时代(如 ChatGPT、Perplexity、Google AI Overview),AI 模型需要快速从海量网页中提取准确的事实和步骤。普通的文章对 AI 来说是一大段文本,而加上 HowTo 结构化数据后,你相当于直接递给 AI 一份清晰的清单:“这是第一步做什么,第二步做什么”。这能极大降低 AI 的理解难度,让你的内容更容易被 AI 选中并作为权威答案引用。
具体怎么操作?
HowTo 必须使用 <script type="application/ld+json"> 标签嵌入到 HTML 源码中,并且强烈建议通过服务端渲染(SSR)输出,这样爬虫才能第一时间看到。
以下是一个标准的 HowTo 模板,你可以结合 PbootCMS 的标签进行改造:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "{pboot:title}",
"description": "{pboot:description}",
"totalTime": "PT30M",
"step": [
{
"@type": "HowToStep",
"name": "第一步的简短标题",
"text": "这里填写第一步的详细文字描述,必须与页面正文可见的文字逐字一致。"
},
{
"@type": "HowToStep",
"name": "第二步的简短标题",
"text": "这里填写第二步的详细文字描述。",
"image": "{content:ico}"
}
]
}
</script>
💬 评论