summaryrefslogtreecommitdiff
path: root/templates/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-15 09:44:55 -0500
committerDan McGee <dan@archlinux.org>2012-09-15 09:44:55 -0500
commit97595b7a26f09f89905e893b8be56b1424d0584b (patch)
tree76db785d18457458057b4e4857fbf52069ac283e /templates/news
parent9e0df2b2873533fd3faa6525c0f925c70acb2847 (diff)
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>
Diffstat (limited to 'templates/news')
-rw-r--r--templates/news/view.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/templates/news/view.html b/templates/news/view.html
index 7788dece..8a4d8122 100644
--- a/templates/news/view.html
+++ b/templates/news/view.html
@@ -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">