Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adjusting to getnikola/nikola#2695.
  • Loading branch information
felixfontein committed Apr 2, 2017
1 parent 5e173f6 commit c8f5d0f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 11 additions & 6 deletions v7/hierarchical_pages/conf.py.sample
@@ -1,9 +1,6 @@
# Use hierarchical pages instead of pages:

PAGES = (
("does_not_exist/*.rst", "", "story.tmpl"),
("does_not_exist/*.txt", "", "story.tmpl"),
("does_not_exist/*.html", "", "story.tmpl"),
)

HIERARCHICAL_PAGES = (
Expand All @@ -12,6 +9,14 @@ HIERARCHICAL_PAGES = (
("pages/*.html", "", "story.tmpl"),
)

# Warning: due to https://github.com/getnikola/nikola/issues/2496
# all wildcards for compilers used in HIERARCHICAL_PAGES must be
# listed in PAGES or POSTS (or both) as well!
# Warning: if you use Nikola before v7.8.5, all wildcards
# for compilers used in HIERARCHICAL_PAGES must be listed
# in PAGES or POSTS (or both) as well!
# (See https://github.com/getnikola/nikola/issues/2496)
# This can be achieved as follows in the above example:
#
# PAGES = (
# ("does_not_exist/*.rst", "", "story.tmpl"),
# ("does_not_exist/*.txt", "", "story.tmpl"),
# ("does_not_exist/*.html", "", "story.tmpl"),
# )
4 changes: 4 additions & 0 deletions v7/hierarchical_pages/hierarchical_pages.py
Expand Up @@ -161,3 +161,7 @@ def crawl(node, destinations_so_far, root=True):
crawl(root, root.slugs)

return timeline

def supported_extensions(self):
"""Return a list of supported file extensions, or None if such a list isn't known beforehand."""
return list({os.path.splitext(x[0])[1] for x in self.site.config.get('HIERARCHICAL_PAGES', [])})

0 comments on commit c8f5d0f

Please sign in to comment.