我在电子商务产品页面上同时拥有Micro Data和JSON-LD,描述了同样的事情(在我的情况下是产品).由于超出此问题范围的原因,我无法删除这两种格式中的任何一种.我想知道:
这对谷歌来说是个问题吗?结构化数据测试工具确实显示两个项目(产品)而不是一个.
如果一个属性(假设产品的名称)在两种格式之间略有不同,那么两种格式中的任何一种,例如JSON-LD是否优先?
如果我有以下标记:
<body itemscope="" itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Lecture 12: Graphs, networks, incidence matrices</h1>
<p itemprop="description">These video lectures of Professor Gilbert
Strang teaching 18.06 were recorded in Fall 1999 and do not
correspond precisely to the current edition of the textbook.</p>
<div itemprop="publisher" itemscope="" itemtype="http://schema.org/CollegeOrUniversity">
<h4 class="footer">About <span itemprop="name">MIT OpenCourseWare</span></h4>
</div>
<a itemprop="license"
rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/deed.en_US"><img
src="/images/cc_by-nc-sa.png" alt="Creative Commons logo with terms BY-NC-SA." /></a>
</body>
Run Code Online (Sandbox Code Playgroud)
我想重构发布者属性,因为它很复杂,我不想显示它并执行此操作:
<body itemscope="" itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Lecture 12: Graphs, networks, incidence matrices</h1>
<p itemprop="description">These video lectures of Professor Gilbert
Strang …Run Code Online (Sandbox Code Playgroud) 使用http://www.schema.org/Product的特定格式是否有任何优点/缺点?像"Searchengines比JSON-LD更了解Microdata"之类的东西?我想使用JSON-LD,因为它不会弄乱你的html代码,但我不确定使用微数据是否会更好地关注searchengines.
我想知道如何构建我的 Schema.org。我对 JSON-LD 和微数据元素使用混合方法。我不使用它们以两种不同的方式来描述一件事。我需要一些关于包含哪些内容的指南。
现在我在每一页都有对我们公司的描述:
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "Organization",
"url" : "https://our.url",
"logo" : "https://our.url/logo2.svg",
"contactPoint" : [{
"@type" : "ContactPoint",
"telephone" : "",
"contactType" : "Customer Service"
}],
"sameAs" :[],
"name" : "Our Small Company"
}
</script>
Run Code Online (Sandbox Code Playgroud)
然后我在 JSON-LD 中再次对我们的网页进行了简短的描述:
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "WebSite",
"url" : "http://our.url",
"potentialAction" : {
"@type" : "SearchAction",
"target" : "http://our.url/search",
"query-input" : "required name=search_term_string"
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
从这里开始,我拥有所有元素的微数据。例如搜索结果是带有产品的 ItemList 等。
这看起来好吗?我应该在每个页面上包含 JSON-LD …