feat: add a table of content on blog posts

This commit is contained in:
Bruno Carlin 2025-07-06 14:22:12 +02:00
parent 874def264c
commit 1f0c9ae560
Signed by: bcarlin
GPG key ID: 8E254EA0FFEB9B6D
5 changed files with 51 additions and 0 deletions

View file

@ -23,6 +23,16 @@
</div>
</header>
{{ with .TableOfContents }}
{{- if ne . `<nav id="TableOfContents"></nav>` }}
<section class="table-of-contents">
<p>{{ T "table_of_contents" }}</p>
{{ . }}
</section>
{{- end }}
{{- end }}
<section class="e-content">
{{ .Content }}
</section>