diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-18 16:41:11 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-18 16:41:11 +0800 |
| commit | be5321a9ac8d4038cdc2520677103838cd389944 (patch) | |
| tree | ad807b7ca76e16960d5c21652fef158514637237 /layouts/_default/uncategorized.html | |
| parent | 7bba3786bdd7628962e7d780298de633fb85486e (diff) | |
feat: add a page listing all uncategorized posts
Diffstat (limited to 'layouts/_default/uncategorized.html')
| -rw-r--r-- | layouts/_default/uncategorized.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/_default/uncategorized.html b/layouts/_default/uncategorized.html new file mode 100644 index 00000000..44dd79f5 --- /dev/null +++ b/layouts/_default/uncategorized.html @@ -0,0 +1,20 @@ +{{ define "main" }} +<article class="taxonomy"> + {{ partial "components/post-page-header.html" . }} + {{ partial "components/breadcrumbs.html" . }} + <div class="post-content"> + <!-- Uncategorized --> + {{ $uncategorized := where (where .Site.RegularPages "Section" "posts") "Params.categories" "==" nil }} + {{ if $uncategorized }} + <section class="uncategorized-posts"> + <ol> + {{ range $uncategorized }} + <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> + {{ end }} + </ol> + </section> + {{ end }} + </div> +</article> +{{ partial "footer.html" . }} +{{ end }} |
