add ability to put changelog in front matter of each page

This commit is contained in:
KemoNine 2024-07-04 14:10:01 -04:00
parent a7f4ac1240
commit 96d5805abd
3 changed files with 23 additions and 6 deletions

View file

@ -4,6 +4,18 @@
<main> <main>
{{ .Content }} {{ .Content }}
{{ if .Params.changelog }}
<h2>Changelog</h2>
<div id="Changelog">
<dl>
{{ range .Params.changelog }}
<dt><strong>{{ .date }}</strong></dt>
<dd>{{ .text }}</dd>
{{ end }}
</dl>
</div>
{{ end }}
</main> </main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View file

@ -59,6 +59,7 @@
<a id="top" /> <a id="top" />
{{ if .Params.toc }} {{ if .Params.toc }}
<h2>Table of Contents</h2>
{{ .TableOfContents }} {{ .TableOfContents }}
{{ else }} {{ else }}
{{ end }} {{ end }}

View file

@ -27,6 +27,10 @@ hr {
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 5px; border-radius: 5px;
} }
#Changelog {
border: 1px solid #eee;
border-radius: 5px;
}
/* pagination */ /* pagination */
.pagination { text-align: center; } .pagination { text-align: center; }