Schema.org中的新闻项目 [英] News item in Schema.org
问题描述
我目前正在为网站制作新闻页。由于我在 http://schema.org/ 上没有找到任何新闻示例,我想知道什么是最好的架构.org类型吗?
I'm currently working on a news page for a website. Since I don't find any news example on http://schema.org/, I was wondering what's the best Schema.org type for this?
<li>
<time>2015-12-31<time>
<div>
<h2>News title</h2>
<div class="content">Lorem Ipsum</div>
</div>
</li>
我是否应该费心添加微数据?
Should I even bother adding Microdata?
我目前拥有的内容:
<li itemscope itemtype="http://schema.org/Article">
<time itemprop="datePublished">2015-12-31<time>
<div>
<h2 itemprop="headline">News title</h2>
<div class="content" itemprop="description">Lorem Ipsum</div>
</div>
</li>
文章
合适吗?
我应该使用标题
还是名称
?
我应该使用 description
或 articleBody
?
推荐答案
Schema.org类型文章
是合适的,因为它的描述说(大胆强调我的):
The Schema.org type Article
is appropriate, as its description says (bold emphasis mine):
一篇文章,例如新闻文章或调查文章报告。 [...]
An article, such as a news article or piece of investigative report. […]
但是你甚至可以通过使用 NewsArticle
type (请注意,使用此类型,您的新闻帖子是 还 文章
和还 CreativeWork
和还一个 Thing
,所以你不要遗漏任何东西。
But you can even be more specific by using the NewsArticle
type (note that by using this type, your news post is also an Article
and also an CreativeWork
and also a Thing
, so you don’t "miss" anything).
关于 description
与 articleBody
:就像他们的描述说,您将使用 description
获取简短描述,使用 articleBody
获取新闻的实际主体文章。
Regarding description
vs. articleBody
: Just like their descriptions say, you would use description
for a "short description" and articleBody
for the "actual body" of the news article.
关于 name
与 标题
:他们通常拥有相同的内容,所以如果你不知道/需要这种差异,你可以使用两者( itemprop =标题名称
)或简单地使用使用 name
(因为这是每个项目/ Thing
可以有的,而标题
仅适用于 CreativeWork
。
Regarding name
vs. headline
: they would often have the same content, so if you don’t know/need this difference, you could either use both (itemprop="headline name"
) or simply go with name
(as this is what every item/Thing
can have, while headline
is an addition for CreativeWork
only).
它与Microdata无关,但您可能希望对此列表中的每个新闻帖使用文章
元素。如果它是一个列表,例如,最近的新闻帖子,父母应该可能不是文章
但是部分
:
It has nothing to do with the Microdata, but you might want to use the article
element for each news post in this list. If it’s a list, for example, of recent news posts, the parent should probably not be article
but section
:
<section>
<h1>Recent news posts</h1>
<ul>
<li><article><!-- news post 1 --></article></li>
<li><article><!-- news post 2 --></article></li>
</ul>
</section>
文章
可能如下所示: / p>
And an article
could look like:
<li>
<article itemscope itemtype="http://schema.org/NewsArticle">
<header>
<time itemprop="datePublished">2015-12-31<time>
<h2 itemprop="name">News title</h2>
</header>
<div itemprop="description"><!-- news teaser --></div>
<!-- or "articleBody" instead of "description" if it’s the full content -->
</article>
</li>
这篇关于Schema.org中的新闻项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!