summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-04-26 11:55:54 +0800
committereltrac <hi@eltr.ac>2026-04-26 11:55:54 +0800
commitb365a8174f391a5bc2bee459ed2358c773d82ac5 (patch)
treeb66b41646b4948ef98160f66446e18bb7fc636ce
parent0c2db4ac5cdf5496f9b00a4825c5db566b32698c (diff)
fix(/uncategorized): problematic uncategorized page list
- change discarded section names (posts and essasys) to new section "article" - duplicated headers and footers due to previous template refactor - remove section pages and other pages with zero date - functional programming style because I like it :3
-rw-r--r--layouts/uncategorized.html21
1 files changed, 10 insertions, 11 deletions
diff --git a/layouts/uncategorized.html b/layouts/uncategorized.html
index a269a18..a015852 100644
--- a/layouts/uncategorized.html
+++ b/layouts/uncategorized.html
@@ -1,22 +1,21 @@
{{ define "main" }}
<article>
- {{ partial "header" . }}
- {{ partial "home/home-nav" . }}
<div class="post-content markdown-body">
<p>{{ .Content }}</p>
</div>
- <!-- Uncategorized -->
- {{ $posts := .Site.GetPage "section" "posts" }}
- {{ $essays := .Site.GetPage "section" "essays" }}
- {{ $combined := $posts.Pages | append $essays.Pages }}
- {{ $uncategorized := where $combined "Params.categories" "eq" nil }}
- {{ if $uncategorized }}
+ {{ $uncategorized := where
+ (where
+ .Site.Pages
+ "Section" "article")
+ "Params.categories" "eq" nil }}
+ {{ with $uncategorized }}
<ol class="ps-0 flex flex-col gap-2 leading-relaxed">
- {{ range $uncategorized }}
- {{ partial "items/post-small" . }}
+ {{ range . }}
+ {{ if not .Date.IsZero }}
+ {{ partial "items/post-small" . }}
+ {{ end }}
{{ end }}
</ol>
{{ end }}
</article>
-{{ partial "footer.html" . }}
{{ end }}