Add structured data markup from schema.org to news items

We use the 'Article' type since this isn't print media.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-09-15 09:44:55 -05:00
parent 9e0df2b287
commit 97595b7a26

View File

@ -3,9 +3,19 @@
{% block title %}Arch Linux - News: {{ news.title }}{% endblock %}
{% block content %}
<div class="news-article box">
<div itemscope itemtype="http://schema.org/Article" class="news-article box">
<h2>News: {{ news.title }}</h2>
<h2 itemprop="headline">{{ news.title }}</h2>
<meta itemprop="dateCreated" content="{{ news.postdate|date:"Y-m-d" }}"/>
<meta itemprop="datePublished" content="{{ news.postdate|date:"Y-m-d" }}"/>
<meta itemprop="dateModified" content="{{ news.last_modified|date:"Y-m-d" }}"/>
<meta itemprop="inLanguage" content="en"/>
<div style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="{{ news.author.get_full_name|escape }}"/>
</div>
<div style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Arch Linux"/>
</div>
{% if perms.news.change_news %}
<ul class="admin-actions">