我需要一些帮助来获取我的网站上的一些丰富网页摘要
我按照schema.org上的说明插入了评论微数据http://schema.org/docs/gs.html#advanced_missing使用星形图像进行评级和审核计数文本,但是使用测试工具对其进行测试它什么都没显示. 我们使用微数据进行评论的示例页面.
这就是我用过的东西
<div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">
<A HREF="javascript:an();"><img src="/images/stars/4.5.gif" border=0></a>
<meta itemprop="ratingValue" content="4.5" />
<meta itemprop="bestRating" content="5" />
<BR>
<span class="bottomnavfooter">
<A HREF="javascript:an();">Read (<span itemprop="ratingCount">70</span>) Reviews</A
</span>
</div>
Run Code Online (Sandbox Code Playgroud)
然后,我创建了一个静态测试页面,并使用Google在此处提供的说明进行了一些更改http://www.google.com/support/webmasters/bin/answer.py?answer=172705(这与我在架构中找到的不同.组织!!)但测试仍然只返回产品名称而不是价格或评论.
这是我的测试页 - 你能不能看看我哪里出错了
非常感谢!!
假设我有一个包含父建筑或其他地址信息的地址,例如:
Barnes & Noble
Union Square
33 E 17th St
New York, NY 10003
Run Code Online (Sandbox Code Playgroud)
要么
Koi Restaurant
Bryant Park Hotel
40 W 40th St
New York, NY 10018
Run Code Online (Sandbox Code Playgroud)
我应该如何使用schema.org标记"联合广场"或"布莱恩特公园酒店"部分地址?这被认为是街道地址的一部分吗?Yelp似乎把它全部放在街道地址,例如:
<span itemprop="streetAddress">Union Square<br>33 E 17th St</span>
Run Code Online (Sandbox Code Playgroud) 我有一个显示图像的网站.显示的图像被调整大小,然后由Web应用程序缓存.但缓存是不稳定的.对于微数据,我想链接到非易失性图像.
我目前的解决方案是
<img src="cache/image-resized.jpg" />
<img src="static/image.jpg" itemprop="image" style="display:none;"/>
Run Code Online (Sandbox Code Playgroud)
这有效.Google正确解释微数据,并显示已调整大小的图像.但是用户浏览器还会下载静态图像,这是一个大图像.
那么如何在不让浏览器下载图像的情况下设置微数据图像属性呢?
我应该用HTML5微数据标记公司的开放时间.在Google和schema.org上搜索了一下后,我编写了以下代码:
<time itemprop="openingHours" datetime="Mo 13:00-17:30"><span class="day">Maandag:</span> <span class="hours">13:00-17:30</span></time>
<time itemprop="openingHours" datetime="Tu 09:00-17:30"><span class="day">Dinsdag:</span> <span class="hours">09:00-17:30</span></time>
<time itemprop="openingHours" datetime="We 09:00-17:30"><span class="day">Woensdag:</span> <span class="hours">09:00-17:30</span></time>
<time itemprop="openingHours" datetime="Th 09:00-17:30"><span class="day">Donderdag:</span> <span class="hours">09:00-17:30</span></time>
<time itemprop="openingHours" datetime="Fr 09:00-21:00"><span class="day">Vrijdag:</span> <span class="hours">09:00-21:00</span></time>
<time itemprop="openingHours" datetime="Sa 08:30-15:00"><span class="day">Zaterag:</span> <span class="hours">08:30-15:00</span></time>
Run Code Online (Sandbox Code Playgroud)
当我使用Google的结构化数据测试工具检查网站时,我发现结构化数据已被正确识别.问题是这个赋值的一个要求是它符合W3C的HTML验证器.对于每个时间元素,我得到以下错误.
Bad value Mo 13:00-17:30 for attribute datetime on element time: The literal did not satisfy the time-datetime format.
Run Code Online (Sandbox Code Playgroud)
我明白为什么我会得到这个错误,我没有得到的是我如何以HTML5微数据标记的方式指定我的开放时间,并且根据HTML5验证器它们也是有效的HTML.
希望你们能帮我解决这个问题.:)
我是Microdata的新手,并且在一个itemscope内部遇到问题table.
例如,假设我有一个人物对象,在表格中我显示了姓名,街道和城市列.
<table>
<tr itemscope itemtype="http://schema.org/Person">
<td itemprop="name">Name</td>
<td itemprop="streetAddress">123 main</td>
<td itemprop="addressCountry">USA</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
请注意,streetAddress并且addressCountry应该是address属性的子项.但是你不能添加一个父div组来分组table.
此外,点符号似乎不起作用,例如address.streetAddress.
怎么会支持这个?
在阅读了数千个帖子,问题,博客文章和意见之后,我仍然对如何使用微数据标记网页感到困惑.如果微数据的主要目的是帮助搜索引擎更好地理解网页的内容(并且隐含地假定网页),那么从body元素中的itemtype网页开始是否正确,然后继续标记其余的嵌套元素定义哪个是主要实体,或者最好从一个物理类型开始,理想情况下,该类型是网页的主要主题并在顶层关联属性,或者最好在顶层具有不同的项目类型(即网页) ,博客文章和页面的主题)?
一个例子将更好地解释我的问题:如果我必须标记包含关于特定主题的博客文章的网页(比如关于无线技术),那么顶级项目应该是什么?应该是网页,博客或无线技术?
所以我一直在研究这个HTML 5微数据,但我不确定它是否适合使用.我知道,如果用于评级,你搜索一个网站,它会提取视频评级和文章评级等内容.但对于像人物或地方这样的微数据,这是非常有用的,我应该开始在我的所有网站中实现它 - 大和小?如果我开始在所有东西上使用Microdata,这对我的搜索引擎优化有多大影响?
也许使用像http://schema.org/这样的标准术语词典.我认为这是谷歌建议使用的.这里是微数据开发的链接http://dev.w3.org/html5/md/,如果您不熟悉微数据,将会有所帮助
如果我有以下标记:
<body itemscope="" itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Lecture 12: Graphs, networks, incidence matrices</h1>
<p itemprop="description">These video lectures of Professor Gilbert
Strang teaching 18.06 were recorded in Fall 1999 and do not
correspond precisely to the current edition of the textbook.</p>
<div itemprop="publisher" itemscope="" itemtype="http://schema.org/CollegeOrUniversity">
<h4 class="footer">About <span itemprop="name">MIT OpenCourseWare</span></h4>
</div>
<a itemprop="license"
rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/deed.en_US"><img
src="/images/cc_by-nc-sa.png" alt="Creative Commons logo with terms BY-NC-SA." /></a>
</body>
Run Code Online (Sandbox Code Playgroud)
我想重构发布者属性,因为它很复杂,我不想显示它并执行此操作:
<body itemscope="" itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Lecture 12: Graphs, networks, incidence matrices</h1>
<p itemprop="description">These video lectures of Professor Gilbert
Strang …Run Code Online (Sandbox Code Playgroud) 在Person模式下,我想将每个职位与其各自的组织相关联.这是一个类似简历的设置,所以有很多工作和很多组织.
这是我项目中一些代码的实际示例(内容已剪切+已更改):
<div itemscope itemtype="http://schema.org/Person">
…
<p><!--list of jobs-->
<span itemprop="jobTitle">Job 1</span>,
<span itemprop="jobTitle">Job 2</span>, and
<span itemprop="jobTitle">Job 3</span>
</p>
<p><!--list of places worked for-->
<span itemprop="worksFor">Company A</span> and
<span itemprop="worksFor">Company B</span>
</p>
</div>
Run Code Online (Sandbox Code Playgroud)
这会从https://search.google.com/structured-data/testing-tool/ 返回这样的架构:
@type Person
jobTitle Job 1
jobTitle Job 2
jobTitle Job 3
worksFor
@type Organization
name Company A
worksFor
@type Organization
name Company B
Run Code Online (Sandbox Code Playgroud)
假设我希望工作1和2成为A公司的一部分,而Job 3则成为公司B的一部分.我如何表达它,以便它在Schema中具有干净的层次结构?
我知道我可以选择itemref(从如何与schema.org中的项目相关的问题?)但我无法弄清楚如何设计一种方法来jobTitle引用Organization(worksFor …