Mercurial > piecrust2
changeset 835:cc9593b9bcbf
Land assets in the correct directory for pages with no pretty_urls override
author | Ben Artin <ben@artins.org> |
---|---|
date | Tue, 03 Jan 2017 02:34:43 -0500 |
parents | 10c482d57c79 |
children | dca51cd8147a |
files | piecrust/baking/single.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/baking/single.py Mon Jan 02 20:33:57 2017 -0500 +++ b/piecrust/baking/single.py Tue Jan 03 02:34:43 2017 -0500 @@ -84,7 +84,8 @@ # Get the URL and path for this sub-page. sub_uri = qualified_page.getUri(cur_sub) logger.debug("Baking '%s' [%d]..." % (sub_uri, cur_sub)) - out_path = self.getOutputPath(sub_uri, qualified_page.pretty_urls) + pretty_urls = qualified_page.pretty_urls if qualified_page.pretty_urls is not None else self.pretty_urls + out_path = self.getOutputPath(sub_uri, pretty_urls) # Create the sub-entry for the bake record. sub_entry = SubPageBakeInfo(sub_uri, out_path) @@ -157,7 +158,7 @@ # Copy page assets. if (cur_sub == 1 and self.copy_assets and sub_entry.anyPass(lambda p: p.used_assets)): - if qualified_page.pretty_urls: + if pretty_urls: out_assets_dir = os.path.dirname(out_path) else: out_assets_dir, out_name = os.path.split(out_path)