gpt4 book ai didi

schema.org - 网页上的任何示例实现 JSON-LD 文档

转载 作者:行者123 更新时间:2023-12-03 09:34:41 25 4
gpt4 key购买 nike

我需要查看在 HTML 中嵌入了 JSON-LD 对象的任何文档。

我在我的架构中嵌入了一个 JSON-LD 对象。我有来自 2 个来源 schema.org 的上下文,我的自定义词汇集是与 www.mysitename/vocab 的 scheam.org 引用进一步协商的。

在这里,我提供了一个带有 .jsonld 文件扩展名的下载链接。我需要从任何已嵌入 JSON-LD 对象的 HTML 文档中查看引用,以了解它。

下面是我的 HTML 文档源代码中嵌入的 JSON-LD 对象:

  <script type="application/ld+json">
{
"@context": [
"http://schema.org/",
"http://puneet.ys/vocab"
],
"@id": "http://puneet.ys/seahawks",
"@type": "SportsTeam",
"name": "Seattle Seahawks",
"url": "http://puneet.ys/seahawks",
"image": "/2011/12/08/35/team/222398/large.jpg",
"interactionCount": "124 UserLikes",
"logo": "/2011/12/08/35/team/222398/large.jpg",
"description": "The Seattle Seahawks are […]",
"discipline": "http://puneet.ys/sport/football",
"subOrganizationOf": "http://puneet.ys/company/nfl",
"location": {
"@id": "http://puneet.ys/seattle-wa",
"@type": "Place",
"name": "Seattle, WA",
"url": "http://puneet.ys/seattle-wa",
"image": "/2011/12/08/35/city/28545/large.jpg",
"interactionCount": "25 UserLikes",
"photo": "/2011/12/08/35/city/28545/large.jpg",
"sameAs": [
"http://www.freebase.com/m/0d9jr",
"http://en.wikipedia.org/wiki/Seattle",
"http://www.seattle.gov/"
]
},
"claimedBy": "http://puneet.ys/fan/chris-mccoy",
"sameAs": [
"http://www.freebase.com/m/070xg",
"http://www.facebook.com/Seahawks",
"http://www.twitter.com/seahawks",
"http://en.wikipedia.org/wiki/Seattle_Seahawks",
"http://www.seahawks.com"
]
} </script>

最佳答案

在此 Google Webmaster Tools Answer它说:

The data, enclosed within the <script type="application/ld+json"> ... </script> tags as shown in the examples below may be placed in either the <HEAD> or <BODY> region of the page. Either way, it won’t affect how your document appears in users’ web browsers.



我包裹了你的 script以上在 <html><header>标签,它与 Google Email Markup-Tester 一起使用,尽管出于某种原因 Google Webmaster Structured Data Testing Tool还没有选择 JSON-LD。

您也可以使用 Google's Structured Data Markup Helper ,输入一些虚拟 URL 或 HTML,单击“开始标记”(蓝色按钮),添加至少一个标签,然后“创建 HTML”(红色按钮),最后将“微数据”下拉列表更改为“JSON-LD”。

关于schema.org - 网页上的任何示例实现 JSON-LD 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24094251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com