我开始使用来自 schema.org 在我的HTML代码中,并准备了图像库(下面的摘要)。当我将代码粘贴到 Google结构化数据测试工具, ,我没有收到任何错误,因此我假设使用这些模式是正确的,但是如果是的话,那还是。是吗?

<figure itemscope itemtype="http://schema.org/ImageGallery">
  <figcaption itemprop="description">The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Etching. Anonymous, ca. 1423.</figcaption>
    <a href="castle1423.jpeg" itemprop="contentURL"> <img src="castle1423_thumb.jpeg" alt="The castle has one tower, and a tall wall around it." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Oil-based paint on canvas. Maria Towle, 1858.</figcaption>
    <a href="castle185.jpeg" itemprop="contentURL"> <img src="castle1858_thumb.jpeg" alt="The castle now has two towers and two walls." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Film photograph. Peter Jankle, 1999.</figcaption>
    <a href="castle1999.jpeg" itemprop="contentURL"> <img src="castle1999_thumb.jpeg" alt="The castle lies in ruins, the original tower all that remains in one piece." itemprop="thumbnailUrl"> </a> </figure>
</figure>
有帮助吗?

解决方案

image 财产ImageGallery a)期望URL,b)定义为:

该项目图像的URL。

因此,您的标记说:“我的ImageGallery可以通过三个图像描述。“;虽然可能应该说:”我的ImageGallery由三张图像组成。".

所以 image 您可以指定可用于表示整个画廊的图像。

对于画廊的每个图像,您可能应该使用 associatedMedia 财产 (但是我不确定我是否确定是否正确地定义了,”编码“在这里使我感到困惑)。

每个的标记 ImageObject 在我看来很好。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top