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

@ -56,9 +56,10 @@
</div> </div>
<a id="top" /> <a id="top" />
{{ if .Params.toc }} {{ if .Params.toc }}
{{ .TableOfContents }} <h2>Table of Contents</h2>
{{ else }} {{ .TableOfContents }}
{{ end }} {{ else }}
{{ 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; }
@ -75,4 +79,4 @@ a.footnote-ref::after {
background: #ff1493; background: #ff1493;
padding: 5px; padding: 5px;
border-radius: 5px; border-radius: 5px;
} }