Mercurial > piecrust2
diff piecrust/app.py @ 230:016d42c23ba9
internal: Make the simple page source use `slug` everywhere.
Before, it would use `slug` in some places, and `path` in other places, which
would be quite confusing.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 11 Feb 2015 08:29:09 -0800 |
parents | 7decf00eee47 |
children | da5e6e00fb41 |
line wrap: on
line diff
--- a/piecrust/app.py Wed Feb 11 08:27:52 2015 -0800 +++ b/piecrust/app.py Wed Feb 11 08:29:09 2015 -0800 @@ -26,7 +26,7 @@ logger = logging.getLogger(__name__) -CACHE_VERSION = 14 +CACHE_VERSION = 15 class VariantNotFoundError(Exception): @@ -199,9 +199,9 @@ routesc = [] routesc.append({ - 'url': '/%path:path%', + 'url': '/%path:slug%', 'source': 'pages', - 'func': 'pcurl(path)'}) + 'func': 'pcurl(slug)'}) sitec['routes'] = routesc taxonomiesc = collections.OrderedDict() @@ -302,9 +302,9 @@ 'item_name': 'page', 'realm': REALM_THEME} sitec['routes'].append({ - 'url': '/%path:path%', + 'url': '/%path:slug%', 'source': 'theme_pages', - 'func': 'pcurl(path)'}) + 'func': 'pcurl(slug)'}) # Sources have the `default` scanner by default, duh. Also, a bunch # of other default values for other configuration stuff.