【SEO】Next SEO的使用方法:2

14 篇文章 0 订阅

这篇文章是紧跟上篇文章的,没有阅读上篇文章的小伙伴可以点击下面↓↓↓进去阅读

JSON-LD格式

接下来,SEO 现在能够将 JSON-LD 设置为一种结构化数据形式。结构化数据是一种标准化格式,用于提供有关网页的信息和对网页内容进行分类。

如果使用应用程序目录,请确保添加 useAppDir={true} 属性,并且您正在使用 page.js 中的组件

下面您将找到一个非常基本的页面,该页面实现了每种可用的 JSON-LD 类型:

  • Article
  • Breadcrumb
  • 博客
  • Campground
  • Recipe
  • 附加链接搜索框
  • Course
  • 数据
  • 公司联系方式
  • FAQ页面
  • 操作方法
  • 招聘启事
  • 本地业务
  • 产品
  • 社交资料
  • 新闻报道
  • 公园

JSON-LD 安全性

只是关于安全性的快速说明。要将 JSON-LD 放到页面上,它需要位于 script 标记中。 为此,请使用带有 的 script 标记。

因此,如果将任何内容直接从 URL 传递到以下组件之一,请确保在需要时先对其进行清理。

查看实施详细信息。

处理多个实例

如果您的页面需要给定 JSON-LD 组件的多个实例,您可以指定唯一属性,并将处理其余部分。

这对于博客卷、搜索结果和概述页面非常方便。

请充分研究何时应该添加多个 JSON-LD 实例,以及不应该添加多个 JSON-LD 实例。

<ExampleJsonLd keyOverride="my-new-key" />

Article

import { ArticleJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Article JSON-LD</h1>
    <ArticleJsonLd
      useAppDir={false}
      url="https://example.com/article"
      title="Article headline"
      images={[
        'https://example.com/photos/1x1/photo.jpg',
        'https://example.com/photos/4x3/photo.jpg',
        'https://example.com/photos/16x9/photo.jpg',
      ]}
      datePublished="2015-02-05T08:00:00+08:00"
      dateModified="2015-02-05T09:00:00+08:00"
      authorName={[
        {
          name: 'Jane Blogs',
          url: 'https://example.com',
        },
        {
          name: 'Mary Stone',
          url: 'https://example.com',
        },
      ]}
      publisherName="Gary Meehan"
      publisherLogo="https://www.example.com/photos/logo.jpg"
      description="This is a mighty good description of this article."
      isAccessibleForFree={true}
    />
  </>
);

export default Page;

Breadcrumb

import { BreadcrumbJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Breadcrumb JSON-LD</h1>
    <BreadcrumbJsonLd
      itemListElements={[
        {
          position: 1,
          name: 'Books',
          item: 'https://example.com/books',
        },
        {
          position: 2,
          name: 'Authors',
          item: 'https://example.com/books/authors',
        },
        {
          position: 3,
          name: 'Ann Leckie',
          item: 'https://example.com/books/authors/annleckie',
        },
        {
          position: 4,
          name: 'Ancillary Justice',
          item: 'https://example.com/books/authors/ancillaryjustice',
        },
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
itemListElements
itemListElements.positionBreadcrumb在Breadcrumb轨迹中的位置。位置 1 表示小径的开始。
itemListElements.name为用户显示的痕迹导航的标题。
itemListElements.item表示痕迹导航的网页的 URL。

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

博客

import { ArticleJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Blog JSON-LD</h1>
    <ArticleJsonLd
      type="BlogPosting"
      url="https://example.com/blog"
      title="Blog headline"
      images={[
        'https://example.com/photos/1x1/photo.jpg',
        'https://example.com/photos/4x3/photo.jpg',
        'https://example.com/photos/16x9/photo.jpg',
      ]}
      datePublished="2015-02-05T08:00:00+08:00"
      dateModified="2015-02-05T09:00:00+08:00"
      authorName="Jane Blogs"
      description="This is a mighty good description of this blog."
    />
  </>
);

export default Page;

Campground

import { CampgroundJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Campground JSON-LD</h1>
    <CampgroundJsonLd
      id="https://www.example.com/campground/rip-van-winkle-campground"
      name="Rip Van Winkle Campgrounds"
      url="https://www.example.com/campground"
      telephone="+18452468114"
      images={['https://example.com/photos/1x1/photo.jpg']}
      address={{
        streetAddress: '149 Blue Mountain Rd',
        addressLocality: 'Saugerties',
        addressRegion: 'NY',
        postalCode: '12477',
        addressCountry: 'US',
      }}
      description="Description about Rip Van Winkle Campgrounds"
      geo={{
        latitude: '42.092599',
        longitude: '-74.018580',
      }}
      openingHours={[
        {
          opens: '09:00',
          closes: '17:00',
          dayOfWeek: [
            'Monday',
            'Tuesday',
            'Wednesday',
            'Thursday',
            'Friday',
            'Saturday',
            'Sunday',
          ],
          validFrom: '2019-12-23',
          validThrough: '2020-04-02',
        },
      ]}
      petsAllowed
      rating={{
        ratingValue: '5',
        ratingCount: '18',
      }}
      amenityFeature={{
        name: 'Showers',
        value: true,
      }}
      priceRange="$$"
    />
  </>
);

export default Page;

必需属性

财产信息
@id以 URL 形式提供特定Campground的全局唯一 ID。
address具体Campground位置的地址
address.addressCountry2 个字母的 ISO 3166-1 alpha-2 国家/地区代码
address.addressLocality城市
address.addressRegion省/市/自治区/直辖市/自治区(如适用)。
address.postalCode邮政编码。
address.streetAddress街道编号、街道名称和单元号。
nameCampground名称。
descriptionCampground描述。

支持的属性

财产信息
geoCampground的地理坐标。
geo.latitudeCampground位置的纬度
geo.longitudeCampground位置的经度
imagesCampground的一张或多张图片。对于有效标记是必需的,具体取决于类型
telephoneCampground电话号码是客户的主要联系方式。
url特定Campground的完全限定 URL。
openingHoursCampground的开放时间规范。您可以将其作为单个对象提供,也可以将其作为具有以下属性的对象数组提供。
openingHours.opens地点或服务在一周中给定日期的开放时间。
openingHours.closes地点或服务在一周中给定日期的关闭时间。
openingHours.dayOfWeek这些开放时间有效的星期几。可以是字符串或字符串数组。
openingHours.validFrom项目生效的日期。
openingHours.validThrough项目无效的日期。
isAccessibleForFreeCampground是否免费开放。
petsAllowed campgroud是否允许宠物入住。
amenityFeature露营地的便利设施(例如特色或服务)。
amenityFeature.name设施的名称。
amenityFeature.value便利设施的价值。
priceRange露营地的价格范围,例如 $$$。
rating露营地的平均评分基于多个评分或评论。
rating.ratingValue内容的分级。
rating.ratingCount评分总数的计数。

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

Recipe

import { RecipeJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Recipe JSON-LD</h1>
    <RecipeJsonLd
      name="Party Coffee Cake"
      description="This coffee cake is awesome and perfect for parties."
      datePublished="2018-03-10"
      authorName={['Jane Blogs', 'Mary Stone']}
      prepTime="PT20M"
      cookTime="PT30M"
      totalTime="PT50M"
	  keywords="cake for a party, coffee"
	   yields="10"
	   category="Dessert"
      cuisine="American"
      calories={270}
      'https://example.com/photos/1x1/photo.jpg',
        'https://example.com/photos/4x3/photo.jpg',
        'https://example.com/photos/16x9/photo.jpg',
      ]}
      ingredients={[
        '2 cups of flour',
        '3/4 cup white sugar',
        '2 teaspoons baking powder',
        '1/2 teaspoon salt',
        '1/2 cup butter',
        '2 eggs',
        '3/4 cup milk',
      ]}
      instructions={[
        {
          name: 'Preheat',
          text: 'Preheat the oven to 350 degrees F. Grease and flour a 9x9 inch pan.',
          url: 'https://example.com/party-coffee-cake#step1',
          image: 'https://example.com/photos/party-coffee-cake/step1.jpg',
        },
      ]}
      aggregateRating={{
        ratingValue: '5',
        ratingCount: '18',
      }}
      video={{
        name: 'How to make a Party Coffee Cake',
        description: 'This is how you make a Party Coffee Cake.',
        contentUrl: 'http://www.example.com/video123.mp4',
        embedUrl: 'http://www.example.com/videoplayer?video=123',
        uploadDate: '2018-02-05T08:00:00+08:00',
        duration: 'PT1M33S',
        thumbnailUrls: [
          'https://example.com/photos/1x1/photo.jpg',
          'https://example.com/photos/4x3/photo.jpg',
          'https://example.com/photos/16x9/photo.jpg',
        ],
        expires: '2019-02-05T08:00:00+08:00',
        hasPart: {
          '@type': 'Clip',
          name: 'Preheat oven',
          startOffset: 30,
          url: 'http://www.example.com/example?t=30',
        },
        watchCount: 2347,
        publication: {
          '@type': 'BroadcastEvent',
          isLiveBroadcast: true,
          startDate: '2020-10-24T14:00:00+00:00',
          endDate: '2020-10-24T14:37:14+00:00',
        },
        regionsAllowed: ['IT', 'NL'],
      }}
    />
  </>
);

export default Page;

必需属性

财产信息
name配方的名称
description配方说明
authorName配方作者的姓名。可以是字符串或字符串数组。
ingredients成分字符串列表
instructions-
instructions.name指令步骤的名称。
instructions.text指令步骤的方向。

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

附加链接搜索框

import { SiteLinksSearchBoxJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Sitelinks Search Box JSON-LD</h1>
    <SiteLinksSearchBoxJsonLd
      url="https://www.example.com"
      potentialActions={[
        {
          target: 'https://query.example.com/search?q',
          queryInput: 'search_term_string',
        },
        {
          target: 'android-app://com.example/https/query.example.com/search/?q',
          queryInput: 'search_term_string',
        },
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
url与附加链接搜索框关联的网站的网址
potentialActions一个或两个 SearchAction 对象的数组。描述要将查询发送到的 URI 以及发送的请求的语法
potentialActions.target对于网站,应接收和处理搜索查询的处理程序的 URL;对于应用,应处理查询的搜索引擎的 intent 处理程序的 URI
potentialActions.queryInput目标中使用的占位符,用于替换用户给定的查询

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

Course

import { CourseJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Course JSON-LD</h1>
    <CourseJsonLd
      courseName="Course Name"
      description="Introductory CS course laying out the basics."
      provider={{
        name: 'Course Provider',
        url: 'https//www.example.com/provider',
      }}
    />
  </>
);

export default Page;

必需属性

财产信息
courseNameCourse的标题。
descriptionCourse说明。显示限制为 60 个字符。
provider.nameCourse提供者名称。
provider.urlCourse提供者名称 URL。

推荐属性

财产信息
providerUrlCourse提供者的 URL。

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

数据

import { DatasetJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Dataset JSON-LD</h1>
    <DatasetJsonLd
      description="The description needs to be at least 50 characters long"
      name="name of the dataset"
      license="https//www.example.com"
    />
  </>
);

export default Page;

必需属性

财产信息
description描述数据集的简短摘要。需要介于 50 到 5000 个字符之间。
name分发数据集时所依据的许可证。

推荐属性

财产信息
licenseCourse提供者的 URL。

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

公司联系方式

import { CorporateContactJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Corporate Contact JSON-LD</h1>
    <CorporateContactJsonLd
      url="http://www.your-company-site.com"
      logo="http://www.example.com/logo.png"
      contactPoint={[
        {
          telephone: '+1-401-555-1212',
          contactType: 'customer service',
          email: 'customerservice@email.com',
          areaServed: 'US',
          availableLanguage: ['English', 'Spanish', 'French'],
        },
        {
          telephone: '+1-877-746-0909',
          contactType: 'customer service',
          email: 'servicecustomer@email.com',
          contactOption: 'TollFree',
          availableLanguage: 'English',
        },
        {
          telephone: '+1-877-453-1304',
          contactType: 'technical support',
          contactOption: 'TollFree',
          areaServed: ['US', 'CA'],
          availableLanguage: ['English', 'French'],
        },
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
url公司官方网站主页的 URL。
contactPoint
contactPoint.telephone电话号码的国际化版本,以“+”符号和国家/地区代码开头
contactPoint.contactType电话号码用途的描述,即 .Technical Support

推荐的 ContactPoint 属性

财产信息
contactPoint.areaServedString或企业服务的地理区域。示例或Array"US"[“US”, “CA”, “MX”]
contactPoint.availableLanguage有关所用语言的详细信息。示例或"English"[“English”, “French”]
contactPoint.email与企业合作的电子邮件’
gecontactPointo.contactOption有关电话号码的详细信息。例"TollFree"

其他 如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

FAQ页面

import { FAQPageJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>FAQ Page JSON-LD</h1>
    <FAQPageJsonLd
      mainEntity={[
        {
          questionName: 'How long is the delivery time?',
          acceptedAnswerText: '3-5 business days.',
        },
        {
          questionName: 'Where can I find information about product recalls?',
          acceptedAnswerText: 'Read more on under information.',
        },
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
mainEntity
mainEntity.questionName问题的全文。例如,“交货时间是多长时间?
mainEntity.acceptedAnswerText问题的完整答案。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

操作方法

import { HowToJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>How-to JSON-LD</h1>
    <HowToJsonLd
      name="How to tile a kitchen backsplash"
      image="https://example.com/photos/1x1/photo.jpg"
      estimatedCost={{ currency: 'USD', value: '100' }}
      supply={['tiles', 'thin-set', 'mortar', 'tile grout', 'grout sealer']}
      tool={['notched trowel', 'bucket', 'large sponge']}
      step={[
        {
          url: 'https://example.com/kitchen#step1',
          name: 'Prepare the surfaces',
          itemListElement: [
            {
              type: 'HowToTip',
              text: 'Turn off the power to the kitchen and then remove everything that is on the wall, such as outlet covers, switchplates, and any other item in the area that is to be tiled.',
            },
            {
              type: 'HowToDirection',
              text: 'Then clean the surface thoroughly to remove any grease or other debris and tape off the area.',
            },
          ],
          image: 'https://example.com/photos/1x1/photo-step1.jpg',
        },
      ]}
      totalTime="P2D"
    />
  </>
);

export default Page;

必需属性

财产信息
name贴士文章的名称
step一组 HowToStep 元素,这些元素包含操作方法的完整说明。

支持的属性

财产信息
estimatedCost执行指令时消耗的耗材的估计成本。
image已完成的操作方法的图像。
supply执行指令或指示时消耗的电源。
tool执行指令或方向时使用(但未使用)的对象。
totalTime执行所有指令或指示所需的总时间(包括准备耗材的时间),采用 ISO 8601 持续时间格式。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

招聘启事

import { JobPostingJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Job Posting JSON-LD</h1>
    <JobPostingJsonLd
      datePosted="2020-01-06T03:37:40Z"
      description="Company is looking for a software developer...."
      hiringOrganization={{
        name: 'company name',
        sameAs: 'www.company-website-url.dev',
      }}
      jobLocation={{
        streetAddress: '17 street address',
        addressLocality: 'Paris',
        addressRegion: 'Ile-de-France',
        postalCode: '75001',
        addressCountry: 'France',
      }}
      title="Job Title"
      baseSalary={{
        currency: 'EUR',
        value: 40, // Can also be a salary range, like [40, 50]
        unitText: 'HOUR',
      }}
      employmentType="FULL_TIME"
      jobLocationType="TELECOMMUTE"
      validThrough="2020-01-06"
      applicantLocationRequirements="FR"
      experienceRequirements={{
        occupational: {
          minimumMonthsOfExperience: 12,
        },
        educational: {
          credentialCategory: 'high school',
        },
        experienceInPlaceOfEducation: true,
      }}
    />
  </>
);

export default Page;

必需属性

财产信息
datePosted雇主以 ISO 8601 格式发布职位的原始日期
descriptionHTML 格式的作业完整描述
hiringOrganization一个对象,包含有关公司招聘的信息,其中包含以下字段或匿名招聘时的字符串’confidential’
hiringOrganization.name提供工作职位的公司名称
hiringOrganization.sameAs引用网页的 URL
title职位的标题(不是职位的标题)
validThrough以 ISO 8601 格式发布的招聘信息到期日期

支持的属性

财产信息
applicantLocationRequirements员工可能所在的地理位置,才有资格进行远程工作
baseSalary
baseSalary.currency表示货币金额的货币
baseSalary.value定量值的值。您还可以提供一系列最低和最高工资。.
baseSalary.unitText指示计量单位的字符串 基本工资准则
employmentType就业类型 就业类型指南
jobLocation员工将上班的企业的实际位置(例如办公室或工作场所),而不是发布工作的位置。
jobLocation.streetAddress街道地址。例如,1600 Amphitheatre Pkwy
jobLocation.addressLocality地点。例如,山景城。
jobLocation.addressRegion该地区。例如,CA。
jobLocation.postalCode邮政编码。例如,94043
jobLocation.addressCountry国家。例如,美国。您还可以提供双字母 ISO 3166-1 alpha-2 国家/地区代码。
jobLocationType作业地点作业地点类型指南的说明
hiringOrganization.logo第三方招聘网站上的徽标 招聘组织指南
experienceRequirements.occupational.minimumMonthsOfExperience职位发布所需的最低工作月数。经验和教育要求
experienceRequirements.educational.credentialCategory招聘信息所需的教育水平。使用以下选项之一:、、、、high schoolassociate degreebachelor degreeprofessional certificatepostgraduate degree
experienceRequirements.experienceInPlaceOfEducation布尔值:如果设置为 true,则此属性指示招聘信息是否接受经验来代替其正式教育资格。如果设置为 true,则必须同时包含 experienceRequirements 和 educationRequirements 属性。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

本地业务

本地业务由属性子集支持。

<LocalBusinessJsonLd
  type="Store"
  id="http://davesdeptstore.example.com"
  name="Dave's Department Store"
  description="Dave's latest department store in San Jose, now open"
  url="http://www.example.com/store-locator/sl/San-Jose-Westgate-Store/1427"
  telephone="+14088717984"
  address={{
    streetAddress: '1600 Saratoga Ave',
    addressLocality: 'San Jose',
    addressRegion: 'CA',
    postalCode: '95129',
    addressCountry: 'US',
  }}
  geo={{
    latitude: '37.293058',
    longitude: '-121.988331',
  }}
  images={[
    'https://example.com/photos/1x1/photo.jpg',
    'https://example.com/photos/4x3/photo.jpg',
    'https://example.com/photos/16x9/photo.jpg',
  ]}
  sameAs={[
    'www.company-website-url1.dev',
    'www.company-website-url2.dev',
    'www.company-website-url3.dev',
  ]}
  openingHours={[
    {
      opens: '08:00',
      closes: '23:59',
      dayOfWeek: [
        'Monday',
        'Tuesday',
        'Wednesday',
        'Thursday',
        'Friday',
        'Saturday',
      ],
      validFrom: '2019-12-23',
      validThrough: '2020-04-02',
    },
    {
      opens: '14:00',
      closes: '20:00',
      dayOfWeek: 'Sunday',
      validFrom: '2019-12-23',
      validThrough: '2020-04-02',
    },
  ]}
  rating={{
    ratingValue: '4.5',
    ratingCount: '2',
  }}
  review={[
    {
      author: 'John Doe',
      datePublished: '2006-05-04',
      name: 'A masterpiece of literature',
      reviewBody:
        'I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood.',
      reviewRating: {
        bestRating: '5',
        worstRating: '1',
        reviewAspect: 'Ambiance',
        ratingValue: '4',
      },
    },
    {
      author: 'Bob Smith',
      datePublished: '2006-06-15',
      name: 'A good read.',
      reviewBody: "Catcher in the Rye is a fun book. It's a good book to read.",
      reviewRating: {
        ratingValue: '4',
      },
    },
  ]}
  makesOffer={[
    {
      priceSpecification: {
        type: 'UnitPriceSpecification',
        priceCurrency: 'EUR',
        price: '1000-10000',
      },
      itemOffered: {
        name: 'Motion Design Services',
        description:
          'We are the expert of animation and motion design productions.',
      },
    },
    {
      priceSpecification: {
        type: 'UnitPriceSpecification',
        priceCurrency: 'EUR',
        price: '2000-10000',
      },
      itemOffered: {
        name: 'Branding Services',
        description:
          'Real footage is a powerful tool when it comes to show what the business is about. Can be used to present your company, show your factory, promote a product packshot, or just tell any story. It can help create emotional links with your audience by showing punchy images.',
      },
    },
  ]}
  areaServed={[
    {
      geoMidpoint: {
        latitude: '41.108237',
        longitude: '-80.642982',
      },
      geoRadius: '1000',
    },
    {
      geoMidpoint: {
        latitude: '51.108237',
        longitude: '-80.642982',
      },
      geoRadius: '1000',
    },
  ]}
  action={{
    actionName: 'potentialAction',
    actionType: 'ReviewAction',
    target: 'https://www.example.com/review/this/business',
  }}
/>

必需属性

财产信息
@id以 URL 形式提供特定营业地点的全局唯一 ID。
typeLocalBusiness 或任何子类型
address具体营业地点地址
address.addressCountry2 个字母的 ISO 3166-1 alpha-2 国家/地区代码
address.addressLocality城市
address.addressRegion省/市/自治区/直辖市/自治区(如适用)。
address.postalCode邮政编码。
address.streetAddress街道编号、街道名称和单元号。
name公司名称。

支持的属性

财产信息
description营业地点说明
geo企业的地理坐标。
geo.latitude营业地点的纬度
geo.longitude营业地点的经度
rating基于多个评级或评论的业务平均评级。
rating.ratingValue内容的分级。
rating.ratingCount评分总数的计数。
priceRange商家的相对价格范围。
servesCuisine餐厅供应的美食类型。
images企业的一张或多张图片。对于有效标记是必需的,具体取决于类型
telephone企业电话号码是客户的主要联系方式。
url特定营业地点的完全限定 URL。
sameAs表示此业务的 URL 数组
openingHours营业时间规范。您可以将其作为单个对象提供,也可以将其作为具有以下属性的对象数组提供。
openingHours.opens地点或服务在一周中给定日期的开放时间。
openingHours.closes地点或服务在一周中给定日期的关闭时间。
openingHours.dayOfWeek这些开放时间有效的星期几。可以是字符串或字符串数组。参考 DayOfWeek
openingHours.validFrom项目生效的日期。
openingHours.validThrough项目无效的日期。
review对当地业务的审查。
review.author此内容或评级的作者。
review.reviewBody审核的实际正文。
review.datePublished首次广播/出版日期。
review.name项的名称。
review.rating这篇评论中给出的评级
review.rating.ratingValue内容的分级。
review.rating.reviewAspect此评论或评级与已审核项目的这一部分或方面相关。
review.rating.worstRating此评级系统中允许的最低值。如果省略 worstRating,则假定为 1。
review.rating.bestRating此评级系统中允许的最高值。如果省略 bestRating,则假定为 5
areasServed提供服务或提供项目所在的地理区域。
areasServed.GeoCircleGeoCircle是表示圆形地理区域的 GeoShape。
areasServed.GeoCircle.geoMidpoint指示位于 GeoShape 中心的 GeoCoordinates,例如 GeoCircle。
areasServed.GeoCircle.geoMidpoint.latitude位置的纬度。例如:37.42242
areasServed.GeoCircle.geoMidpoint.longitude项的名称。
areasServed.GeoCircle.geoRadius表示 GeoCircle 的大致半径(米,除非通过距离表示法另有说明)。
makesOffer指向组织或个人提供的产品或服务的指针。
makesOffer.offer转让项目的某些权利或提供服务的要约
makesOffer.offer.priceSpecification一个或多个详细的价格规格,指示单价和交货或付款费用。
makesOffer.offer.priceSpecification.priceCurrency价格的货币,或附加到 PriceSpecification 及其子类型时的价格组件。
makesOffer.offer.priceSpecification.price产品或附加到 PriceSpecification 及其子类型时价格组件的报价。
makesOffer.offer.itemOffered提供(或要求)的物品
makesOffer.offer.itemOffered.name项目的名称
makesOffer.offer.itemOffered.description项的说明。
action直接代理和间接参与者对直接对象执行的操作。
action.target指示 Action 的目标 EntryPoint。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。
注意:

对于您可以使用的大多数类型,建议使用图像,如有疑问,则应添加图像。

商标

import { LogoJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Logo JSON-LD</h1>
    <LogoJsonLd
      logo="http://www.your-site.com/images/logo.jpg"
      url="http://www.your-site.com"
    />
  </>
);

export default Page;
财产信息
url与徽标关联的网站的 URL。
logo代表组织的徽标的 URL。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

产品

import { ProductJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Product JSON-LD</h1>
    <ProductJsonLd
      productName="Executive Anvil"
      images={[
        'https://example.com/photos/1x1/photo.jpg',
        'https://example.com/photos/4x3/photo.jpg',
        'https://example.com/photos/16x9/photo.jpg',
      ]}
      description="Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height."
      brand="ACME"
      color="blue"
      manufacturerName="Gary Meehan"
      manufacturerLogo="https://www.example.com/photos/logo.jpg"
      material="steel"
      slogan="For the business traveller looking for something to drop from a height."
      disambiguatingDescription="Executive Anvil, perfect for the business traveller."
      releaseDate="2014-02-05T08:00:00+08:00"
      productionDate="2015-02-05T08:00:00+08:00"
      purchaseDate="2015-02-06T08:00:00+08:00"
      award="Best Executive Anvil Award."
      reviews={[
        {
          author: 'Jim',
          datePublished: '2017-01-06T03:37:40Z',
          reviewBody:
            'This is my favorite product yet! Thanks Nate for the example products and reviews.',
          name: 'So awesome!!!',
          reviewRating: {
            bestRating: '5',
            ratingValue: '5',
            worstRating: '1',
          },
          publisher: {
            type: 'Organization',
            name: 'TwoVit',
          },
        },
      ]}
      aggregateRating={{
        ratingValue: '4.4',
        reviewCount: '89',
      }}
      offers={[
        {
          price: '119.99',
          priceCurrency: 'USD',
          priceValidUntil: '2020-11-05',
          itemCondition: 'https://schema.org/UsedCondition',
          availability: 'https://schema.org/InStock',
          url: 'https://www.example.com/executive-anvil',
          seller: {
            name: 'Executive Objects',
          },
        },
        {
          price: '139.99',
          priceCurrency: 'CAD',
          priceValidUntil: '2020-09-05',
          itemCondition: 'https://schema.org/UsedCondition',
          availability: 'https://schema.org/InStock',
          url: 'https://www.example.ca/executive-anvil',
          seller: {
            name: 'Executive Objects',
          },
        },
      ]}
      mpn="925872"
    />
  </>
);

export default Page;

必需属性

财产信息
lowPrice所有优惠中的最低价格。使用浮点数。
priceCurrency用于描述产品价格的货币,采用三个字母的 ISO 4217 格式。

推荐属性

财产信息
highPrice所有优惠中的最高价格。使用浮点数。
offerCount产品的报价数量。
offers转让项目某些权利或提供服务的要约。您可以将其作为单个对象提供,也可以将其作为具有以下属性的对象数组提供。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

社交资料

import { SocialProfileJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Social Profile JSON-LD</h1>
    <SocialProfileJsonLd
      type="Person"
      name="your name"
      url="http://www.your-site.com"
      sameAs={[
        'http://www.facebook.com/your-profile',
        'http://instagram.com/yourProfile',
        'http://www.linkedin.com/in/yourprofile',
        'http://plus.google.com/your_profile',
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
type个人或组织
name个人或组织的名称
url个人或组织的官方网站的 URL。
sameAs个人或组织的官方社交媒体资料页面的 URL 数组

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

Google 支持的社交资料

  • Facebook
  • Twitter
  • Google+
  • Instagram
  • YouTube
  • LinkedIn
  • Myspace
  • Pinterest
  • SoundCloud
  • Tumblr

新闻报道

import { NewsArticleJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>News Article JSON-LD</h1>
    <NewsArticleJsonLd
      url="https://example.com/article"
      title="Article headline"
      images={[
        'https://example.com/photos/1x1/photo.jpg',
        'https://example.com/photos/4x3/photo.jpg',
        'https://example.com/photos/16x9/photo.jpg',
      ]}
      section="politic"
      keywords="prayuth,taksin"
      datePublished="2015-02-05T08:00:00+08:00"
      dateModified="2015-02-05T09:00:00+08:00"
      authorName="Jane Blogs"
      publisherName="Gary Meehan"
      publisherLogo="https://www.example.com/photos/logo.jpg"
      description="This is a mighty good description of this article."
      body="This is all text for this news article"
      isAccessibleForFree={true}
    />
  </>
);

export default Page;

公园

import { ParkJsonLd } from 'next-seo';

const Page = () => (
  <>
    <h1>Park JSON-LD</h1>
    <ParkJsonLd
      id="https://www.example.com/park/minnewaska-state-park"
      name="Minnewaska State Park"
      url="https://www.example.com/park"
      telephone="+18452550752"
      images={['https://example.com/photos/1x1/photo.jpg']}
      address={{
        streetAddress: '5281 Route 44-55',
        addressLocality: 'Kerhonkson',
        addressRegion: 'NY',
        postalCode: '12446',
        addressCountry: 'US',
      }}
      description="A wonderful description about Minnewaska State Park"
      geo={{
        latitude: '41.735149',
        longitude: '-74.239037',
      }}
      openingHours={[
        {
          opens: '09:00',
          closes: '18:00',
          dayOfWeek: [
            'Monday',
            'Tuesday',
            'Wednesday',
            'Thursday',
            'Friday',
            'Saturday',
            'Sunday',
          ],
          validFrom: '2019-12-23',
          validThrough: '2020-04-02',
        },
      ]}
    />
  </>
);

export default Page;

必需属性

财产信息
@id以 URL 形式提供特定公园的全局唯一 ID。
address具体公园位置的地址
address.addressCountry2 个字母的 ISO 3166-1 alpha-2 国家/地区代码
address.addressLocality城市
address.addressRegion省/市/自治区/直辖市/自治区(如适用)。
address.postalCode邮政编码。
address.streetAddress街道编号、街道名称和单元号。
name公园名称。
description公园描述。

支持的属性

财产信息
geo公园的地理坐标。
geo.latitude公园位置的纬度
geo.longitude公园位置的经度
images公园的一张或多张图片。对于有效标记是必需的,具体取决于类型
telephone企业电话号码是客户的主要联系方式。
url特定公园的完全限定 URL。
openingHours公园的开放时间规范。您可以将其作为单个对象提供,也可以将其作为具有以下属性的对象数组提供。
openingHours.opens地点或服务在一周中给定日期的开放时间。
openingHours.closes地点或服务在一周中给定日期的关闭时间。
openingHours.dayOfWeek这些开放时间有效的星期几。可以是字符串或字符串数组。
openingHours.validFrom项目生效的日期。
openingHours.validThrough项目无效的日期。
isAccessibleForFree公园是否免费开放。

其他如果使用新的应用目录,则应将其设置为 true。如果在应用目录之外,则不需要。

如需要搜索引擎优化学习资料的小伙伴可以私信我或者扫描下面图片↓↓↓,可以免费领取seo最新面试题和SEO的学习资料同时我们也有相应的学习群可以一起交流学习。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值