【问题标题】:JSON-LD format for WebPage and BlogPostingWebPage 和 BlogPosting 的 JSON-LD 格式
【发布时间】:2016-12-06 06:40:21
【问题描述】:

我有一个医生博客。我的第一页只有一些数据和热门帖子。

所以我用这个:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "WebPage",
    "name": "website name",
    "description": "website  description",
    "publisher": {
        "@type": "WebPageMedic",
        "name": "my company name"
    }
}
</script>

现在换一个页面,怎么写JSON-LD格式?

我试试这个:

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "WebPage",
        "name": "website name",
        "description": "website  description",
        "publisher": {
            "@type": "WebPageMedic",
            "name": "my company name"
        },
        "mainEntity":{
         "@type":"BlogPosting",
         "headline":"BlogPosting",
         "datePublished":"2015-03-09T13:08:00-07:00",
         "articleBody": "articleBody"
        }
    }
    </script>

我想我必须在所有页面中写网站信息(WebPage),然后在mainEntity 中我可以写BlogPosting 和其他东西。

我说的对吗?

【问题讨论】:

    标签: blogs schema.org json-ld


    【解决方案1】:

    是的,如果您希望每个页面都有一个 WebPage 项目(即 not necessary, but can be useful),那么这是一个合适的结构。

    对于包含多个博客文章的页面(在这种情况下,您可能希望使用CollectionPage),您可以使用Blog 项目或ItemList 项目作为主要实体。另一种选择是使用hasPart 属性。请参阅example with mainEntity ItemList


    关于您的示例的说明:

    • WebPage 的属性应该是关于页面的,而不是关于站点的。您使用了“网站名称”和“网站描述”。如果您想说明您的网站,可以使用WebSite 类型。

    • 没有WebPageMedic 类型。您可能想要使用Organization 或其子类型之一,例如MedicalBusiness

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-18
      • 2018-02-07
      相关资源
      最近更新 更多