Skip to content
Permalink
Browse files

Adjusting to getnikola/nikola#2695.

  • Loading branch information
felixfontein committed Apr 2, 2017
1 parent 5e173f6 commit c8f5d0f97e34d2ef92a6fd8643f2ad6072eb7a09
Showing with 15 additions and 6 deletions.
  1. +11 −6 v7/hierarchical_pages/conf.py.sample
  2. +4 −0 v7/hierarchical_pages/hierarchical_pages.py
@@ -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 = (
@@ -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"),
# )
@@ -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.
You can’t perform that action at this time.