Add BlogPosting microformat to news feed

This commit is contained in:
Trever Fischer
2012-04-12 16:21:26 -04:00
parent 342c4b496d
commit 7810de993b
2 changed files with 9 additions and 9 deletions

View File

@@ -6,13 +6,13 @@
{% block content %} {% block content %}
{% for post in items.object_list %} {% for post in items.object_list %}
<div class='item'> <div class='item' itemscope itemtype="http://schema.org/BlogPosting">
<h2><a href="{{post.get_absolute_url}}">{{post.title}}</a></h2> <h2><a href="{{post.get_absolute_url}}" itemprop="name">{{post.title}}</a></h2>
<div class="byline">By {{post.author}}</div> <div class="byline">By <span itemprop="author">{{post.author}}</span></div>
<div class="content"> <div class="content" itemprop="articleBody">
{{post.body|truncatewords:"100"|markdown}} {{post.body|truncatewords:"100"|markdown}}
</div> </div>
<div class="commentcount"><a href="{{post.get_absolute_url}}">{{post.comments.all|length}} comment{{post.comments.all|length|pluralize}} &raquo;</a></div> <div class="commentcount"><a href="{{post.get_absolute_url}}"><span itemprop="interactionCount">{{post.comments.all|length}} comment{{post.comments.all|length|pluralize}}</span> &raquo;</a></div>
</div> </div>
{% endfor %} {% endfor %}

View File

@@ -6,10 +6,10 @@
{% block title %}News - {{item.title}}{% endblock %} {% block title %}News - {{item.title}}{% endblock %}
{% block content %} {% block content %}
<div class="item"> <div class="item" itemscope itemtype="http://schema.org/BlogPosting">
<h2><a href="{{post.get_absolute_url}}">{{item.title}}</a></h2> <h2><a href="{{post.get_absolute_url}}" itemprop="name">{{item.title}}</a></h2>
<div class="byline">By {{item.author}}</div> <div class="byline">By <span itemprop="author">{{item.author}}</span></div>
<div class="content"> <div class="content" itemprop="articleBody">
{{item.body|markdown}} {{item.body|markdown}}
</div> </div>
</div> </div>