Add footnotes support

This commit is contained in:
ItsDrike 2023-12-10 01:07:40 +01:00
parent 1051f84462
commit 4c212e8f64
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 14 additions and 1 deletions

View file

@ -1,4 +1,15 @@
<div class="content-info"> <div class="content-info">
{{ if .Params.Footnotes }}
<div class="footnotes">
<h2>Footnotes</h2>
<ul>
{{ range $i, $e := .Params.Footnotes }}
<li>{{ markdownify $e }}</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if .Params.Sources }} {{ if .Params.Sources }}
<div class="sources"> <div class="sources">
<h2>Sources</h2> <h2>Sources</h2>
@ -9,6 +20,7 @@
</ul> </ul>
</div> </div>
{{ end }} {{ end }}
{{ if .Params.Changelog }} {{ if .Params.Changelog }}
<div class="changelog"> <div class="changelog">
<h2> Changelog</h2> <h2> Changelog</h2>
@ -26,4 +38,5 @@
</ul> </ul>
</div> </div>
{{ end }} {{ end }}
</div> </div>

View file

@ -31,7 +31,7 @@
<article>{{ .Content }}</article> <article>{{ .Content }}</article>
{{ if or .Params.Sources .Params.Changelog }} {{ if or (or .Params.Sources .Params.Changelog) .Params.Footnotes }}
<hr> <hr>
{{ partial "content-info.html" . }} {{ partial "content-info.html" . }}
{{ end }} {{ end }}