我有博客门户网站,并使用来自themeforest的已付费主题。我现在关注SEO并实现了schema.org。但我对例子和我的标记感到困惑。
<!--MAIN SECTION-->
<div class="main post-page">
<div class="row">
<!--CONTENT-->
<div class="col-md-9 col-sm-12 clearfix">
<!--POST-->
<article class="post row mid" itemscope itemtype="http://schema.org/BlogPosting">
<div class="img col-md-3 col-sm-6 col-xs-12">
<img src="example.jpg" itemprop="image" >
<div class="col-md-8 col-sm-6 col-xs-12">
<div class="info">
<h1>{{$post->title}}</h1>
<div class="data">
<p class="details"><h4>Author : John Doe</h4></p>
</div>
<div id="text-post">{{ $post->content() }}</div>
</div>
<div>
<!--END POST-->
<h3>About Author</h3>
<article class="row mid member" itemscope itemtype="http://schema.org/Person">
<img src="/author.jpg" alt="thumbnail" />
<div class="info">
<h1>John Doe</h1>
<p class="text">{{ $post->author->biography }}</p>
</div>
</article>.....
但是当我查看google中的示例时
<div itemscope itemtype="http://data-vocabulary.org/Person">
My name is <span itemprop="name">Bob Smith</span>
but people call me <span itemprop="nickname">Smithy</span>.
Here is my home page:
<a href="http://www.example.com" itemprop="url">www.example.com</a>
I live in Albuquerque, NM and work as an <span itemprop="title">engineer</span>
at <span itemprop="affiliation">ACME Corp</span>.
</div>
它有很多<span>...</span>
元素而我的元素没有。我是否必须重新编写所有标记,或者我可以使用我的标记并从那里添加schema.org元素。
谢谢。
答案 0 :(得分:1)
您应该能够在标记中包含各种属性标记,例如:
<!--MAIN SECTION-->
<div class="main post-page">
<div class="row">
<!--CONTENT-->
<div class="col-md-9 col-sm-12 clearfix">
<!--POST-->
<article class="post row mid" itemscope itemtype="http://schema.org/BlogPosting">
<div class="img col-md-3 col-sm-6 col-xs-12">
<img src="example.jpg" itemprop="image" />
<div class="col-md-8 col-sm-6 col-xs-12">
<div class="info">
<h1 itemprop="headline">{{$post->title}}</h1>
<div class="data">
<p class="details"><h4>Author : John Doe</h4></p>
</div>
<div id="text-post" itemprop="articleBody">{{ $post->content() }}</div>
</div>
<div>
<!--END POST-->
<h3>About Author</h3>
<article class="row mid member" itemprop="author" itemscope itemtype="http://schema.org/Person">
<itemprop="image" img src="/author.jpg" alt="thumbnail" />
<div class="info">
<h1 itemprop="name">John Doe</h1>
<p class="text" itemprop="description">{{ $post->author->biography }}</p>
</div>
</article>.....
我还建议在你的标记中加入日期。