diff options
Diffstat (limited to 'templates/_nav.html')
-rw-r--r-- | templates/_nav.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/templates/_nav.html b/templates/_nav.html index 270f028..600ec4d 100644 --- a/templates/_nav.html +++ b/templates/_nav.html @@ -17,9 +17,11 @@ {{ nav::hamburger(root=root) }} {# Section title #} - <!-- <div class="toc-item toc-section"> --> - <!-- <a class="subtext" href="{{root.permalink | safe}}">{{ root.title }}</a> --> - <!-- </div> --> + {# + <div class="toc-item toc-section"> + <a class="subtext" href="{{root.permalink | safe}}">{{ root.title }}</a> + </div> + #} {# Choose between "tree" (has extra.parent) and "list" (default) collections #} {% set root_tree = root.pages | group_by(attribute="extra.parent") %} @@ -46,7 +48,12 @@ {# (Private) Build a breadcrumb for the page #} {# It's ugly because this is the hacky part of the project #} -{% macro breadcrumb(corpus, root, target) %}{% if 'parent' in target.extra and target.extra.parent != root %}{% set new_target = get_page(path=target.extra.parent) %}{{ nav::breadcrumb(corpus=corpus, root=root, target=new_target) }}:{{ new_target.relative_path }}{% endif %}{% endmacro %} +{% macro breadcrumb(corpus, root, target) %} + {% if 'parent' in target.extra and target.extra.parent != root %} + {% set new_target = get_page(path=target.extra.parent) %} + {{ nav::breadcrumb(corpus=corpus, root=root, target=new_target) }}:{{ new_target.relative_path }} + {% endif %} +{% endmacro %} {# (Private) Render a list menu (this is the simple fallback when extra.parent is not defined #} {% macro list(list, selected) %} |