网页和文章的区别 - Schema.org
Difference between WebPage and Article - Schema.org
由于 Schema.org 中可用的选项数量有限,我想知道当它不适合其他类别时最好使用什么模式。例如,如果我正在写关于汽车的文章(假设没有汽车模式,因为我没有见过)那么我应该使用文章模式还是网页模式?
官方文档给出了三个选项:
If you publish content of an unsupported type, you have three options:
- Do nothing (don't mark up the content in any way). However, before you decide to do this, check to see if any of the types supported by schema.org - such as reviews, comments, images, or breadcrumbs - are relevant.
- Use a less-specific markup type. For example, schema.org has no "Professor" type. However, if you have a directory of professors in your university department, you could use the "person" type to mark up the information for every professor in the directory.
- If you are feeling ambitious, use the schema.org extension system to define a new type.
此外,如果您没有明确声明网页的类型,它会被视为 http://schema.org/WebPage,这是您在这种情况下可以使用的最通用的类型。
(Schema.org 有一个汽车类型 Car
,它是 Product
。我在这个答案中使用鹦鹉作为示例。)
您可能想要 differentiate 在页面的内容和页面之间。
您可以使用 WebPage
标记您的页面,但这并不能传达页面的内容/内容。为了表示这一点,您需要另一个可用作 about
/ mainEntity
属性.
值的项目
如果 Schema.org 没有提供特定类型,请在类型层次结构中向上移动。 总是 一种有效的类型:Thing
。或者换句话说:从 Thing
开始,一直往下直到找到最具体的类型。有关详细信息,请参阅 my answer on Webmasters SE。
所以关于特定鹦鹉 (Thing
) 的页面 (WebPage
) 可以这样标记:
<body typeof="schema:WebPage">
<article property="schema:mainEntity" typeof="schema:Thing">
</article>
</body>
如果可能的话,除了 Schema.org 类型之外,还可以使用来自其他词汇表(例如,来自动物甚至鹦鹉本体论)的合适的特定类型。例如,您可以使用 Parrot
type from DBpedia:
<body typeof="schema:WebPage" prefix="dbpedia: http://dbpedia.org/resource/">
<article property="schema:about" typeof="schema:Thing dbpedia:Parrot">
</article>
</body>
由于 Schema.org 中可用的选项数量有限,我想知道当它不适合其他类别时最好使用什么模式。例如,如果我正在写关于汽车的文章(假设没有汽车模式,因为我没有见过)那么我应该使用文章模式还是网页模式?
官方文档给出了三个选项:
If you publish content of an unsupported type, you have three options:
- Do nothing (don't mark up the content in any way). However, before you decide to do this, check to see if any of the types supported by schema.org - such as reviews, comments, images, or breadcrumbs - are relevant.
- Use a less-specific markup type. For example, schema.org has no "Professor" type. However, if you have a directory of professors in your university department, you could use the "person" type to mark up the information for every professor in the directory.
- If you are feeling ambitious, use the schema.org extension system to define a new type.
此外,如果您没有明确声明网页的类型,它会被视为 http://schema.org/WebPage,这是您在这种情况下可以使用的最通用的类型。
(Schema.org 有一个汽车类型 Car
,它是 Product
。我在这个答案中使用鹦鹉作为示例。)
您可能想要 differentiate 在页面的内容和页面之间。
您可以使用 WebPage
标记您的页面,但这并不能传达页面的内容/内容。为了表示这一点,您需要另一个可用作 about
/ mainEntity
属性.
如果 Schema.org 没有提供特定类型,请在类型层次结构中向上移动。 总是 一种有效的类型:Thing
。或者换句话说:从 Thing
开始,一直往下直到找到最具体的类型。有关详细信息,请参阅 my answer on Webmasters SE。
所以关于特定鹦鹉 (Thing
) 的页面 (WebPage
) 可以这样标记:
<body typeof="schema:WebPage">
<article property="schema:mainEntity" typeof="schema:Thing">
</article>
</body>
如果可能的话,除了 Schema.org 类型之外,还可以使用来自其他词汇表(例如,来自动物甚至鹦鹉本体论)的合适的特定类型。例如,您可以使用 Parrot
type from DBpedia:
<body typeof="schema:WebPage" prefix="dbpedia: http://dbpedia.org/resource/">
<article property="schema:about" typeof="schema:Thing dbpedia:Parrot">
</article>
</body>