diff options
Diffstat (limited to 'templates/partials/toc.html')
| -rw-r--r-- | templates/partials/toc.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/partials/toc.html b/templates/partials/toc.html new file mode 100644 index 0000000..2089d15 --- /dev/null +++ b/templates/partials/toc.html @@ -0,0 +1,10 @@ +{% component toc.render(headers: array) %} +<ul> + {% for header in headers %} + <li> + <a href="{{ header.permalink | safe }}">{{ header.title }}</a> + {% if header.children %}{{<toc.render headers={header.children} />}}{% endif %} + </li> + {% endfor %} +</ul> +{% endcomponent toc.render %} |
