diff piecrust/processing/sitemap.py @ 147:ab6e7e0e9d44

Pass date information to routing when building URLs. This is so that URLs with dates in them can be built even when the date information is not coming from the source metadata, but from the page's config.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 29 Nov 2014 21:00:44 -0800
parents 371a6c879ab9
children 1c4078ec3011
line wrap: on
line diff
--- a/piecrust/processing/sitemap.py	Sat Nov 29 20:58:28 2014 -0800
+++ b/piecrust/processing/sitemap.py	Sat Nov 29 21:00:44 2014 -0800
@@ -67,7 +67,7 @@
 
             for page in source.getPages():
                 route = self.app.getRoute(source.name, page.source_metadata)
-                uri = route.getUri(page.source_metadata)
+                uri = route.getUri(page.source_metadata, page)
 
                 t = page.datetime.timestamp()
                 sm_cfg = page.config.get('sitemap')