summaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-11-08 16:31:38 -0600
committerDan McGee <dan@archlinux.org>2014-11-08 16:31:38 -0600
commit96a7614285325b693434f3fd011238000d75926d (patch)
tree243fab620a9fa57cd93c2412bde1f7190373caf0 /urls.py
parent4c5b478543184ea395e0e692d3bcf666fb7513ad (diff)
Add a news-specific sitemap
This follows the spec at https://support.google.com/news/publisher/answer/74288?hl=en#tagdefinitions Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/urls.py b/urls.py
index 6d896b3c..c35baedf 100644
--- a/urls.py
+++ b/urls.py
@@ -18,6 +18,8 @@ our_sitemaps = {
'releases': sitemaps.ReleasesSitemap,
}
+news_sitemaps = { 'news': sitemaps.RecentNewsSitemap }
+
urlpatterns = []
# Public pages
@@ -81,7 +83,12 @@ urlpatterns += patterns('',
{'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}),
(r'^sitemap-(?P<section>.+)\.xml$',
cache_page(1831)(sitemap_views.sitemap),
- {'sitemaps': our_sitemaps, 'template_name': 'sitemaps/sitemap.xml.jinja'}, 'sitemaps'),
+ {'sitemaps': our_sitemaps, 'template_name': 'sitemaps/sitemap.xml.jinja'},
+ 'sitemaps'),
+ (r'^news-sitemap\.xml$',
+ cache_page(1831)(sitemap_views.sitemap),
+ {'sitemaps': news_sitemaps, 'template_name': 'sitemaps/news_sitemap.xml.jinja'},
+ 'news-sitemap'),
)
# Authentication / Admin