Features
4 JSON-LD
配置网站 Json-LD 数据。
前言
JSON-LD(JavaScript Object Notation for Linked Data) 是一种由 W3C 推荐的标准,广泛用于在网页中嵌入结构化数据。Google 支持 JSON-LD 格式来帮助网站所有者向搜索引擎提供更丰富的上下文信息,从而增强搜索结果的展示效果(例如知识图谱、丰富结果等)。
文档
- google json-ld 定义 https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data?hl=zh-cn
json-ld 组件
- 组件文件
app/components/JsonLD/WebSite.vue
这是定义了网站基本信息的json-ld
数据。 - vue spa 中调用。
<JsonLDWebSite />
- 输出
<script type = "application/ld+json" > [{
"@context": "https://schema.org",
"@type": "Organization",
"name": "SaaS Fast INFO",
"alternateName": "SaaS Fast - SaaS Fast 开发模版 - Nuxtjs",
"description": "SaaS Fast - 欢迎使用 SaaS Fast 开发模版!我们将为您展示如何利用我们的产品显著提升工作效率,优化资源配置,从而释放您的宝贵时间。",
"url": "https://saas.ducafecat.com/",
"logo": "https://saas.ducafecat.com/logo.svg",
"foundingDate": "2024",
"email": "ducafecat@gmail.com",
"sameAs": ["https://www.youtube.com/@ducafecat", "https://space.bilibili.com/404904528"],
"founder": [{
"@type": "Person",
"name": "Ducafe cat",
"jobTitle": "CEO"
}]
}, {
"@context": "https://schema.org",
"@type": "Person",
"name": "Ducafe cat",
"alternateName": "CEO",
"description": "Ducafecat is an highly experienced independent software developer.",
"url": "https://saas.ducafecat.com/data",
"image": "https://saas.ducafecat.com/logo.svg",
"jobTitle": "CEO",
"memberOf": {
"@type": "Organization",
"name": "ducafecat INFO"
},
"worksFor": {
"@type": "Organization",
"name": "ducafecat INFO",
"url": "https://saas.ducafecat.com.com/"
},
"sameAs": ["https://www.youtube.com/@ducafecat", "https://space.bilibili.com/404904528"]
}, {
"@context": "https://schema.org",
"@type": "WebSite",
"name": "SaaS Fast",
"alternateName": "SaaS Fast - SaaS Fast 开发模版 - Nuxtjs",
"description": "SaaS Fast - 欢迎使用 SaaS Fast 开发模版!我们将为您展示如何利用我们的产品显著提升工作效率,优化资源配置,从而释放您的宝贵时间。",
"keywords": "SaaS Fast 开发模版, 代码下载, 独立开发者资源",
"url": "https://saas.ducafecat.com",
"image": "https://saas.ducafecat.com/logo.svg"
}] < /script>
检查 json-ld 是否正确
Google 网址 https://search.google.com/test/rich-results
end