docs/templates/partials/toc.html (328B)
1 {# 목차. page.toc_entries는 항상 채워지고, 보일지 말지는 front matter의 toc가 정한다. #}
2 {% macro toc_list(entries) %}
3 <ul>
4 {%- for e in entries %}
5 <li>
6 <a href="#{{ e.id }}">{{ e.title }}</a>
7 {%- if e.children %}{{ toc_list(e.children) }}{% endif %}
8 </li>
9 {%- endfor %}
10 </ul>
11 {% endmacro %}