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>
{{ .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>
{{ partial "footer.html" . }}

View file

@ -56,9 +56,10 @@
</div>
<a id="top" />
<a id="top" />
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ else }}
{{ end }}
{{ if .Params.toc }}
<h2>Table of Contents</h2>
{{ .TableOfContents }}
{{ else }}
{{ end }}

View file

@ -27,6 +27,10 @@ hr {
border: 1px solid #eee;
border-radius: 5px;
}
#Changelog {
border: 1px solid #eee;
border-radius: 5px;
}
/* pagination */
.pagination { text-align: center; }
@ -75,4 +79,4 @@ a.footnote-ref::after {
background: #ff1493;
padding: 5px;
border-radius: 5px;
}
}