我是所有网站管理员的新手……HTML、CSS 和绝对结构化的数据。我正在努力以极快的速度学习,而这个网站比任何其他网站都更有价值。但是,上次尝试为我的网站配备结构化数据时,我对自己是否做得正确感到迷茫。网上的例子很少,对于我这种类型的摄影画廊网站来说几乎没有。我真的很感激任何关于我是接近点还是偏离点的见解。
现在我关心的是在我的页面上构建显示单张照片的数据,而不是带有缩略图的页面。我在这里使用的示例来自http://www.matttilghman.com/Passage-Through-Time.html
我使用的 itemtypes 是整个页面的 ItemPage,它获得了 Author itemtype(我!)。页面上还有一个照片项目类型,它获取一个作者项目类型和一个位置项目类型。这就是我用于这些仅显示单张照片的页面的全部内容。
我在头部使用元内容来描述 ItemPage。我知道最好为微数据使用可见内容,但我认为我的可见内容最好稍后保存为项目类型照片。
然后我在显示照片的 div 中定义 itemtype Photos。对于照片的关键词,我尝试从可见的描述中截取它们。但这确实是我希望在页面上拥有的唯一可见文本,并且我已将其保存为关键字(我希望这是最重要的)。我还将它加倍为“文本”itemprop(加倍它会导致任何标志吗?)。诸如流派、描述、详细位置之类的东西,我想要结构化的数据,但我不希望它们把页面弄得乱七八糟,所以它都是元数据(这是 Schema 推荐的不可见数据)。大家觉得我的方法还可以吗?我应该在某个地方嵌套另一个重要的 itemtype 吗?我是否对 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>