feat: add a table of content on blog posts
This commit is contained in:
parent
874def264c
commit
1f0c9ae560
5 changed files with 51 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue