M hugo.toml => hugo.toml +3 -1
@@ 7,7 7,9 @@ pygmentsUseClasses = true
unsafe = true
[markup.tableOfContents]
-ordered = true
+ordered = false
+endLevel = 2
+startLevel = 1
[taxonomies]
tags = 'keywords'
M layouts/blog/single.html => layouts/blog/single.html +3 -0
@@ 12,6 12,9 @@
<small>
{{.Date.Format "January 2, 2006"}}
</small>
+ <aside>
+ {{ .TableOfContents }}
+ </aside>
{{.Content}}
</main>
{{ partial "footer.html" . }}
M static/base.css => static/base.css +9 -3
@@ 87,17 87,20 @@ body > main {
display: flex;
flex-direction: column;
}
-nav {
+
+/* TOP NAVBAR */
+/* NOTE: manually exclude TOC, as it breaks the .org TOC otherwise*/
+nav:not(#TableOfContents) {
width: 100%;
}
-nav ul {
+nav:not(#TableOfContents) ul {
text-decoration: none;
display: flex;
gap: 0.4rem;
margin: 0;
padding: 0.4rem;
}
-nav ul li {
+nav:not(#TableOfContents) ul li {
display: block;
}
@@ 323,6 326,7 @@ div.sourceCode:hover::after,pre.example:hover::after, figure:hover::after,div.sr
}
}
+/* LIST ITEMS */
a.category, li.stub {
display: flex;
flex-direction: column;
@@ 380,6 384,7 @@ li.stub .tags li a {
text-decoration: underline;
}
+/* PAGE FOOTER */
footer {
display: flex;
flex-direction: column;
@@ 389,6 394,7 @@ footer * {
text-align: center;
}
+/* HELPERS */
.nopad {
padding: 0;
}