oliverdavies.uk/website/source/_includes/post/table-of-contents.html.twig

10 lines
214 B
Twig
Raw Normal View History

{% if toc %}
<ul>
{% for title in toc %}
<li>
<a href="#{{ title|lower|replace({ ' ': '-' }) }}">{{ title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}