summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-08 11:08:36 -0500
committerDan McGee <dan@archlinux.org>2012-09-08 11:08:36 -0500
commit585b53a52a441761690ef81cd293597f38fa8a2f (patch)
tree89a5cfa7cc5aacabd17909877b8cbf1bc9cf039e /templates
parentf221426a3286b9c9cfcc63a9caea861be9e99d02 (diff)
Add structured data markup from schema.org to package details
This might help out search engines show more helpful blurbs for our package details pages. Tested using the Google Rich Snippets Testing Tool at http://www.google.com/webmasters/tools/richsnippets. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/packages/details.html21
1 files changed, 14 insertions, 7 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 9e898b7f..5a5598a0 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -72,6 +72,17 @@
{% endif %}{% endwith %}
</div>
+ <div itemscope itemtype="http://schema.org/SoftwareApplication">
+ <meta itemprop="name" content="{{ pkg.pkgname|escape }}"/>
+ <meta itemprop="version" content="{{ pkg.full_version|escape }}"/>
+ <meta itemprop="softwareVersion" content="{{ pkg.full_version|escape }}"/>
+ <meta itemprop="fileSize" content="{{ pkg.compressed_size }}"/>
+ <meta itemprop="dateCreated" content="{{ pkg.build_date|date:"Y-m-d" }}"/>
+ <meta itemprop="datePublished" content="{{ pkg.last_update|date:"Y-m-d" }}"/>
+ <meta itemprop="operatingSystem" content="Linux"/>
+ <div style="display:none" itemprop="provider" itemscope itemtype="http://schema.org/Person">
+ <meta itemprop="name" content="{{ pkg.packager.get_full_name|escape }}"/>
+ </div>
<table id="pkginfo">
<tr>
<th>Architecture:</th>
@@ -102,10 +113,10 @@
{% endifequal %}
<tr>
<th>Description:</th>
- <td class="wrap">{{ pkg.pkgdesc|default:"" }}</td>
+ <td class="wrap" itemprop="description">{{ pkg.pkgdesc|default:"" }}</td>
</tr><tr>
<th>Upstream URL:</th>
- <td>{% if pkg.url %}<a href="{{ pkg.url }}"
+ <td>{% if pkg.url %}<a itemprop="url" href="{{ pkg.url }}"
title="Visit the website for {{ pkg.pkgname }}">{{ pkg.url|url_unquote }}</a>{% endif %}</td>
</tr><tr>
<th>License(s):</th>
@@ -186,9 +197,9 @@
<div class="userdata">{{ flag_request.message|linebreaksbr|default:"{no message}" }}</div></td>
</tr>{% endif %}{% endwith %}{% endif %}
</table>
+ </div>
<div id="metadata">
-
{% with pkg.get_depends as deps %}
<div id="pkgdeps" class="listing">
<h3 title="{{ pkg.pkgname }} has the following dependencies">
@@ -198,7 +209,6 @@
</ul>{% endif %}
</div>
{% endwith %}
-
{% with pkg.get_requiredby as rqdby %}
<div id="pkgreqs" class="listing">
<h3 title="Packages that require {{ pkg.pkgname }}">
@@ -208,7 +218,6 @@
</ul>{% endif %}
</div>
{% endwith %}
-
<div id="pkgfiles" class="listing">
<h3 title="Complete list of files contained within this package">
Package Contents</h3>
@@ -218,9 +227,7 @@
View the file list for {{ pkg.pkgname }}</a></p>
</div>
</div>
-
</div>
-
</div>
{% load cdn %}{% jquery %}