summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-15 16:44:55 +0200
committerDan McGee <dan@archlinux.org>2012-09-15 16:44:55 +0200
commit97595b7a26f09f89905e893b8be56b1424d0584b (patch)
tree76db785d18457458057b4e4857fbf52069ac283e /templates
parent9e0df2b2873533fd3faa6525c0f925c70acb2847 (diff)
downloadarchweb-97595b7a26f09f89905e893b8be56b1424d0584b.tar.gz
archweb-97595b7a26f09f89905e893b8be56b1424d0584b.tar.xz
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')
-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 7788dec..8a4d812 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">