{#- The documentation's navigation: every section under docs/, by weight, and the pages in each, by weight. -#} {%- macro sidebar(current) -%} {%- set docs = get_section(path="docs/_index.md") -%} {%- endmacro sidebar -%} {#- The pages before and after this one, in the order of the sidebar. -#} {%- macro pager(current) -%} {%- set docs = get_section(path="docs/_index.md") -%} {%- set_global flat = [] -%} {%- for sub_path in docs.subsections -%} {%- set sub = get_section(path=sub_path) -%} {%- for p in sub.pages -%} {%- set_global flat = flat | concat(with=p) -%} {%- endfor -%} {%- endfor -%} {%- set_global at = -1 -%} {%- for p in flat -%} {%- if p.path == current %}{% set_global at = loop.index0 %}{% endif -%} {%- endfor -%} {%- if at >= 0 %} {%- endif %} {%- endmacro pager -%} {%- macro toc(entries) -%} {%- if entries | length > 0 %} {%- endif %} {%- endmacro toc -%}