feat: add table of contents to blog posts
This commit is contained in:
parent
05748fd193
commit
dbaca137f7
3 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
{% if toc %}
|
||||
<ul>
|
||||
{% for title in toc %}
|
||||
<li>
|
||||
<a href="#{{ title|lower|replace({ ' ': '-' }) }}">{{ title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue