我是网站管理员的新手...... HTML,CSS和绝对结构化的数据。我正试图以极快的速度学习,而且这个网站比任何其他网站都更加珍贵。然而,试图用我的网站装备结构化数据最后让我轻微失去了我是否做得对。在线的例子很少,而且我的摄影画廊网站几乎没有。我真的很感激我是否能够接近或离开。
现在我担心在我的页面上构建显示单张照片的数据,而不是缩略图的页面。我在这里使用的示例来自http://www.matttilghman.com/Passage-Through-Time.html
我使用的itemtypes是整个页面的ItemPage,它获得了一个Author itemtype(我!)。页面上还有一个照片项类型,它获取作者项类型和位置项类型。这就是我用于这些只显示一张照片的页面。
我使用头部中的元内容描述ItemPage。我知道最好使用微观数据的可见内容,但我认为我的可见内容最好保存在后面的itemtype照片中。
然后我在显示照片的div中定义itemtype照片。对于照片的关键字,我尝试从可见描述中狙击它们。但这确实是我想在页面上看到的唯一可见文本,我已经为关键字保存了它(我希望它是最重要的)。我还把它加倍作为“文本”itemprop(它加倍导致任何标志?)。类型,描述,详细位置之类的东西,我想要结构化数据,但我不希望它们混乱页面,所以它都是元(这是Schema推荐的数据并不是可见的)。我的方法看起来对你们好吗?还有其他重要的项目类型我应该在某处嵌套吗?我是否使用了一个使其无用的itemprop(比如使用元内容?),感谢任何建议!
我如何以及在哪里构建ItemPage(在头部):
<!DOCTYPE html>
<html lang="en"> <div id="HTMLDiv" itemscope itemtype="http://schema.org/ItemPage">
<head>
<title itemprop="name">Passage Through Time, by Matt Tilghman</title>
<link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css">
<meta itemprop="keywords" name="keywords" content="blah blah some keywords">
<meta itemprop="description" name="description" content="description about photo etc">
<meta name="author" content="Matt Tilghman">
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Matt Tilghman" />
<meta itemprop="email" content="my email" />
<meta itemprop="description" content="Photographer of Landscapes from California, North Carolina, South Florida, and New Mexico" />
</span>
我如何以及在何处描述照片(在其div中):
<div id="Oneonta-Falls-Oregon" class="separate" align="center" itemscope itemtype="http://schema.org/Photograph">
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Matt Tilghman" />
<meta itemprop="email" content="my email" />
<meta itemprop="description" content="Photographer of Landscapes from California, North Carolina, South Florida, and New Mexico" />
</span>
<meta itemprop="description" content="Passage Through Time, by Matt Tilghman. Fine art photograph of Oneonta Falls, in Oneonta Gorge, on the Oregon side of the Columbia River Gorge. This is the Lower Falls, which is located about a mile upstream from the where the creek meets the Columbia River.">
<meta itemprop="genre" content="nature" />
<meta itemprop="genre" content="fine art" />
<span itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">
<meta itemprop="name" content="Oneonta Gorge">
<meta itemprop="description" content="Oneonta Gorge is on the Oregon side of the Columbia River Gorge, in the Pacific Northwest region of the United States">
</span>
<a name="Oneonta-Falls-Oregon" href="" title="Passage Through Time" onclick="scroll(name,3); return false">
<img itemprop="image" src="images/Oneonta-Falls-Oregon-L.jpg" alt="oneonta, gorge, falls, oneonta falls, waterfall, canyon, slot, pacific northwest, oregon, columbia river gorge" >
</a>
<br><br>
<div class="titleL2" itemprop="name">Passage Through Time</div>
<br>
<div class="captionL2" itemprop="text">Shown here is <span itemprop="keywords">Lower Oneonta Falls</span>, an <span itemprop="keywords">intimate</span> <span itemprop="keywords">waterfall</span> at the end of <span itemprop="keywords">Oneonta Gorge</span>, on the <span itemprop="keywords">Oregon</span> side of the <span itemprop="keywords">Columbia River Gorge</span>. Oneonta Gorge seems like a <span itemprop="genre">landscape</span> off another planet. It's a narrow <span itemprop="keywords">gorge</span> reminiscent of the <span itemprop="keywords">slot canyons</span> of the American Southwest, but in the middle of a <span itemprop="keywords">lush</span> <span itemprop="keywords">temperate</span> <span itemprop="keywords">rain forest</span>, with walls clad in moss and ferns, dripping with moisture. While hiking up the gorge, my mind was first struck by the similarity to a slot canyon, but then began to ponder the different ways they were created. The slot canyons of the Southwest form when rain water drains through existing sandstone channels, further carving them with every downpour. Oneonta Gorge, however, likely formed as the waterfalls (there are four) eroded their own precipice, marching backwards in time. As I considered this, the trek upstream began to feel like a march forward in time, mimicking the path of the waterfall but at a much faster pace. It's a truly remarkable piece of <span itemprop="keywords">wilderness</span>, and well worth the tricky trek over logjams and slippery boulders.</div>
答案 0 :(得分:1)
对我来说很好看。绝对使用Google Structured Data Tesing Tool检查您的微数据标记。
我会对<meta>
元素中包含如此多的信息保持警惕。虽然它不是错误,但它可能会使维护更加困难。另一个值得考虑的方法是将信息放入普通段落,然后使用CSS将其隐藏起来。这样,要检查信息是否是最新的,您需要做的就是禁用CSS,您可以自然地阅读内容。它还具有可被较少的微数据感知索引器索引的好处。