all repos — zola-bearblog @ a70fb3f413a205390b45943007400d5d9a06a72b

Port of bear blog theme to zola

Merge branch 'main' into microformats2

Alan Pearce
commit

a70fb3f413a205390b45943007400d5d9a06a72b

parent

fe37fcf3daa0eaafc1236050ac95b5d4ba21bcd2

1 file changed, 12 insertions(+), 0 deletions(-)

changed files
A templates/macros.html
@@ -0,0 +1,12 @@
+{% macro table_of_contents(toc, max_level) %} +<ul> + {% for header in toc %} + <li> + <a href="{{ header.permalink | safe }}">{{ header.title }}</a> + {% if header.children and header.level < max_level %} + {{ self::table_of_contents(toc=header.children, max_level=max_level) }} + {% endif %} + </li> + {% endfor %} +</ul> +{% endmacro %}