相关疑难解决方法(0)

JSON-LD和Microdata在同一页面上?

我在电子商务产品页面上同时拥有Micro Data和JSON-LD,描述了同样的事情(在我的情况下是产品).由于超出此问题范围的原因,我无法删除这两种格式中的任何一种.我想知道:

  1. 这对谷歌来说是个问题吗?结构化数据测试工具确实显示两个项目(产品)而不是一个.

  2. 如果一个属性(假设产品的名称)在两种格式之间略有不同,那么两种格式中的任何一种,例如JSON-LD是否优先?

structured-data microdata schema.org json-ld

7
推荐指数
1
解决办法
1581
查看次数

混合使用JSON-LD和Microdata Schema.org

如果我有以下标记:

<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)

html5 microdata schema.org json-ld

6
推荐指数
1
解决办法
1645
查看次数

Schema.org:使用Microdata,RDFa还是JSON-LD?

使用http://www.schema.org/Product的特定格式是否有任何优点/缺点?像"Searchengines比JSON-LD更了解Microdata"之类的东西?我想使用JSON-LD,因为它不会弄乱你的html代码,但我不确定使用微数据是否会更好地关注searchengines.

schema.org

4
推荐指数
1
解决办法
1364
查看次数

适用于小公司的 Schema.org 实践:每个页面上的 JSON-LD 格式的“组织”和“网站”,其他所有内容的微数据

我想知道如何构建我的 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 …

microdata schema.org json-ld

2
推荐指数
1
解决办法
1879
查看次数

标签 统计

schema.org ×4

json-ld ×3

microdata ×3

html5 ×1

structured-data ×1