我正在将schema.org Microdata添加到我的网站.
我的HTML代码是这样的:
<div itemscope itemtype="http://schema.org/Organization">
<span class="title">Name of the organization</span>
<a href="http://www.ABCCompany.com/">ABC Company</a>
</div>
Run Code Online (Sandbox Code Playgroud)
由于组织的itemprop"网址"和"名称"都在锚标记中.如何itemprop在同一标签上指明"url"和"name" ?我必须span为此目的添加额外的标签吗?
我已经尝试在此搜索一些编码示例,但找不到任何示例来显示itemprop在同一个标记上使用多个.
最后,我希望Microdata像这样:
url="http://www.ABCCompany.com", name="ABC Company"
Run Code Online (Sandbox Code Playgroud) 由于schema.org相对较新,或许这个问题会促进更多的讨论,而不是一个明确的答案.无论哪种方式,希望可以从别人的应用/经验中学到一些知识.
在研究了http://schema.org文档页面之后 - 虽然似乎有丰富的属性(读取:itemprop属性)可用于丰富博客文章,但似乎存在一些不一致和"灰色区域"的问题.标记博客评论的最佳方法.让我举一个例子:
博客的schema.org文档可以在Thing> CreativeWork> Blog中找到,供参考,博客文章位于Thing> CreativeWork>文章> BlogPosting中
到目前为止,在上述页面的文档和标记的例子提供足够的参考格式化博客索引页,以及内容的个别文章内的总体(author,pubDate,articleBody,interactionCount,等)
当我们开始查看单个UserInteraction元素(博客评论)时interactionCount,事情变得有点模糊.文档引导我们进入Thing> Event> UserInteraction> UserComments,并被描述为"用户交互:关于项目的评论".然而,所有建议的属性UserInteraction都面向物理事件.
唯一似乎与此架构文档中的博客评论相关的属性是description; 这可以用于评论机构.缺乏的是用户对博客帖子的评论的一些特定背景.还没有证据表明所述评论的示例标记,即使在网站上搜索"评论"似乎也没有任何明确性.
有没有人使用schema.org标记他们的博客 - 你是如何处理/解决这个问题的?
我还将通过schema.org反馈表提出此事,如果有任何问题,请更新此帖.
假设我有一个关于一个人找到工作的简单HTML页面:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>New Job for John Doe</title>
</head>
<body>
<h1>New Job for John Doe</h1>
<p>This week John Doe accepted an offer to become a Software Engineer at MITRE. John graduated from MIT in 2005 with a BS in Computer Science. He previously worked at a small company near Boston. Blah, blah, blah.</p>
<p>The MITRE Corporation is a not-for-profit organization chartered to work in the public interest. The MITRE Corporation has two principal locations: Bedford, Massachusetts, …Run Code Online (Sandbox Code Playgroud) 你好,我有一个页面(http://schema.org/WebPage),其中包含一篇评论(http://schema.org/Review)
问题是:
例:
<html itemscope itemtype="http://schema.org/WebPage">
<meta name="description" content="_________" itemprop="description">
...
<div itemscope itemtype="http://schema.org/Review">
<div itemprop="description">_________</div>
</div>
...
</html>
Run Code Online (Sandbox Code Playgroud)
描述属于Review AND到WebPage,所以...在这种情况下我应该写什么?
(注意:在前面的例子中,字符串" _ _ "是相同的文本段落,重复两次)
编辑:
这可以解决吗?(html5规范没有谈到这一点,但定义了itemref属性)
<html itemscope itemtype="http://schema.org/WebPage" id="WEBPAGE">
...
<div itemscope itemtype="http://schema.org/Review" id="REVIEW">
<div itemprop="description" itemref="WEBPAGE REVIEW">_________</div>
</div>
...
</html>
Run Code Online (Sandbox Code Playgroud)
随意改善问题!
我用微工作,我想使用Schema.org的keywords进行CreativeWork.
模式指定它应该是文本,但我是否将每个关键字放在一个单独的元素中,itemprop="keywords"或者我将它们全部放在一个keywords元素中?如果我将它们全部放在一个元素中,我是否使用逗号作为分隔符?
我们对未来的RDF和微观数据有什么期望?微数据是否能够完全取代RDF,这是目标吗?或者它们是否意味着并存?一旦微观数据变得更有名,我们是否应该在我们的网站上同时拥有这两者
更新:我不打算开始讨论,我只想知道微数据是否应该取代RDF,或者它们应该共存.如果它们应该共存,我将很乐意阅读一些指南和可能基于研究的预测.
如何AggregateRating在对象尚未评级时设置(ratingValue= 0)?
我目前的设置是:
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="0" />
<meta itemprop="bestRating" content="5" />
<meta itemprop="worstRating" content="1" />
<div itemprop="ratingCount">0</div>
</div>
Run Code Online (Sandbox Code Playgroud)
当我使用Google测试工具检查微数据时,我收到错误"无法标准化评级值".我只需要设置worstRating为0吗?或者还有另一种方法可以说明没有评级吗?
在研究如何为网页面包屑做微数据时,我发现了几种方法,我不确定哪种方法是正确的.首先,我在HTML中的基本面包屑看起来像这样:
<div>
<a href="/">Root page</a>
<a href="/category">Category page</a>
<a href="/category/this-page">This page</a>
</div>
Run Code Online (Sandbox Code Playgroud)
现在,我是否像这样构建它(正如我在SchemaOrg的示例中看到的那样:
<ol itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="/" itemprop="item">
<span itemprop="name">Root page</span>
</a>
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="/category" itemprop="item">
<span itemprop="name">Category page</span>
</a>
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="/category/this-page" itemprop="item">
<span itemprop="name">This page</span>
</a>
</li>
</ol>
Run Code Online (Sandbox Code Playgroud)
或者像我在Stackoverflow的一些答案中看到的那样构造它如下所示:
<div>
<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="/" itemprop="url">
<span itemprop="title">Root page</span>
</a>
</span>
<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="/category" itemprop="url">
<span itemprop="title">Category …Run Code Online (Sandbox Code Playgroud) 我在https://schema.org/Article找到的每个示例都在Google结构化数据测试工具中至少出现一个错误
据说headline现在需要; 那很好,只需itemprop="name"改为itemprop="name headline"
但它也给出了错误:
A value for the image field is required.
Required by:
Articles Rich Snippets
Run Code Online (Sandbox Code Playgroud)
我听到有人形象地说应该是一个形象的文章(字面解释文档:"该项目的图像") -之类的文章的实际截图.这没用吗?这是否正确?我必须提供图像吗?每篇文章都可以使用相同的空白图像或徽标吗?或者由于不相关,复制图像会受到惩罚吗?
html5 semantic-markup microdata rich-snippets google-rich-snippets
面包屑链接有一个微观数据:http://www.data-vocabulary.org/Breadcrumb/ 但页面链接是否有类似的微数据,如:[< - ] 3 4 5 [上一页] 6 [当前] 7 [下一页] 8 9 10 11 [ - >]
microdata ×10
schema.org ×8
html5 ×5
html ×2
seo ×2
blogs ×1
pagination ×1
rdf ×1
tagging ×1
vocabulary ×1
web-crawler ×1