Permalink
Browse files

allow Wikidata identifiers in /things/ URLs

  • Loading branch information...
1 parent a61236c commit a3f5fca110edcb55b3fea9abd48caeedb95ec347 @njh committed Nov 24, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −1 dbpedialite.rb
  2. +1 −1 views/index.erb
View
@@ -189,7 +189,11 @@ def format_iso8061(datetime)
redirect_from_title(title)
end
- get %r{^/wikidata/Q(\d+)$} do |id|
+ get %r{^/wikidata/[qQ](\d+)$} do |id|
+ redirect_from_wikidata(id)
+ end
+
+ get %r{^/things/[Qq](\d+)$} do |id|
redirect_from_wikidata(id)
end
View
@@ -34,7 +34,7 @@
<li><a href="/titles/Ermine">Ermine</a></li>
<li><a href="/titles/Ceres,_Fife">Ceres, Fife</a></li>
<li><a href="/titles/Berlin">Berlin</a></li>
- <li><a href="/wikidata/Q9531">British Broadcasting Corporation</a></li>
+ <li><a href="/things/Q9531">British Broadcasting Corporation</a></li>
</ul>
<h2>Example Categories</h2>

0 comments on commit a3f5fca

Please sign in to comment.