diff options
author | Dan McGee <dan@archlinux.org> | 2012-09-15 09:44:55 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-09-15 09:44:55 -0500 |
commit | 97595b7a26f09f89905e893b8be56b1424d0584b (patch) | |
tree | 76db785d18457458057b4e4857fbf52069ac283e /templates | |
parent | 9e0df2b2873533fd3faa6525c0f925c70acb2847 (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')
-rw-r--r-- | templates/news/view.html | 14 |
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"> |