如何将结构化数据(JSON-LD)用于由多个子业务组成的本地业务

时间:2016-04-21 23:43:48

标签: json-ld structured-data

我为当地企业建立了一个网站,包括高尔夫球场,室内运动场馆(网球,壁球,wally球,击球笼,鹦鹉螺),餐厅,餐饮,并提供婚礼和招待会。不知道如何开始。任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:2)

下午好,

以下示例可能会有所帮助。请注意,对于@id,我假设你已经为每个实体创建了一个专用页面,并在示例中指出了该链接,但它不必是一个有效的链接,因此如果你还没有创建一个专用的页面,您可以为每个实体创建一个唯一的ID(此ID不应随时间变化)。请参阅There处的部门和子组织的定义。

<script type="application/ld+json">
{ 
  "@context" : "http://schema.org",
  "@type" : "LocalBusiness",
  "name" : "Business Name",
  "@id" : "http://www.your-company-site.com",
  "logo" : "http://www.your-company-site.com/logo.jpg",
  "sameAs" : [ "", "" ],
  "url" : "http://www.your-company-site.com",
  "email" : "example@your-company-site.com",
  "faxNumber" : "+1-401-555-1213",
  "contactPoint" : { 
    "@type" : "ContactPoint",
    "telephone" : "+1-401-555-1212",
    "contactType" : "customer service"
  },
  "openingHoursSpecification": [
    {
    "@type": "OpeningHoursSpecification",
    "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ],
    "opens": "09:00",
    "closes": "21:00"
    },
    {
    "@type": "OpeningHoursSpecification",
    "dayOfWeek": [ "Saturday", "Sunday" ],
    "opens": "10:00",
    "closes": "23:00"
    }
  ],
  "department" : [
    {
    "@type" : "GolfCourse",
    "name" : "Golf Course Name",
    "@id" : "http://www.your-company-site.com/golf-course-dedicated-page-url",
    "logo" : "http://www.your-company-site.com/logo.jpg",
    "sameAs" : [ "", "" ],
    "url" : "http://www.your-company-site.com/golf-course-dedicated-page-url",
    "email" : "golfcourse@your-company-site.com",
    "faxNumber" : "+1-401-555-1215",
    "contactPoint" : { 
      "@type" : "ContactPoint",
      "telephone" : "+1-401-555-1214",
      "contactType" : "customer service"
    },
    "openingHoursSpecification": [
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ],
      "opens": "09:00",
      "closes": "19:00"
      },
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Saturday", "Sunday" ],
      "opens": "09:00",
      "closes": "17:00"
      }
    ]
    },
    {
    "@type" : "TennisComplex",
    "name" : "Tennis Complex Name",
    "@id" : "http://www.your-company-site.com/tennis-complex-dedicated-page-url",
    "logo" : "http://www.your-company-site.com/logo.jpg",
    "sameAs" : [ "", "" ],
    "url" : "http://www.your-company-site.com/tennis-complex-dedicated-page-url",
    "email" : "tenniscomplex@your-company-site.com",
    "faxNumber" : "+1-401-555-1216",
    "contactPoint" : { 
      "@type" : "ContactPoint",
      "telephone" : "+1-401-555-1215",
      "contactType" : "customer service"
    },
    "openingHoursSpecification": [
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ],
      "opens": "09:00",
      "closes": "19:00"
      },
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Saturday", "Sunday" ],
      "opens": "09:00",
      "closes": "17:00"
      }
    ]
    }
  ],
  "subOrganization" : {
    "@type" : "Restaurant",
    "name" : "Restaurant Name",
    "@id" : "http://www.your-company-site.com/restaurant-dedicated-page-url",
    "logo" : "http://www.your-company-site.com/logo.jpg",
    "sameAs" : [ "", "" ],
    "url" : "http://www.your-company-site.com/restaurant-dedicated-page-url",
    "email" : "restaurant@your-company-site.com",
    "faxNumber" : "+1-401-555-1217",
    "contactPoint" : { 
      "@type" : "ContactPoint",
      "telephone" : "+1-401-555-1216",
      "contactType" : "customer service"
    },
    "openingHoursSpecification": [
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Monday", "Tuesday" ],
      "opens": "11:30",
      "closes": "22:00"
      },
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Wednesday", "Thursday", "Friday" ],
      "opens": "11:30",
      "closes": "23:00"
      },
      {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [ "Saturday", "Sunday" ],
      "opens": "16:00",
      "closes": "23:00"
      }
    ]
  }
}
</script>