diff options
Diffstat (limited to 'templates/macros.html')
| -rw-r--r-- | templates/macros.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..cb5efdc --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,16 @@ +{% macro toc(page) %} +<nav class="toc"> + <ul> + {% for h in page.toc %} + <li><a href="{{ h.permalink }}">{{ h.title }}</a></li> + {% if h.children %} + <ul> + {% for c in h.children %} + <li><a href="{{ c.permalink }}">{{ c.title }}</a></li> + {% endfor %} + </ul> + {% endif %} + {% endfor %} + </ul> +</nav> +{% endmacro %} |
