From 294ad30fe625cebc41fe1927cf77f0cafc8668ba Mon Sep 17 00:00:00 2001 From: eltrac Date: Sun, 8 Mar 2026 11:00:14 +0800 Subject: feat: show archvied and pinned categorises --- layouts/_partials/taxonomy/all-categories.html | 14 ++++++++------ layouts/_partials/taxonomy/archived-categories.html | 16 ++++++++++++++++ layouts/taxonomy.html | 4 ++++ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 layouts/_partials/taxonomy/archived-categories.html diff --git a/layouts/_partials/taxonomy/all-categories.html b/layouts/_partials/taxonomy/all-categories.html index 85a228fe..7cb5813a 100644 --- a/layouts/_partials/taxonomy/all-categories.html +++ b/layouts/_partials/taxonomy/all-categories.html @@ -1,29 +1,31 @@ +

* 表示常驻系列,其他系列可能会在完成后停止更新


- {{ range sort .Site.Taxonomies.categories ".Count" "desc" }} + {{ range sort (sort .Site.Taxonomies.categories ".Count" "desc") ".Page.Params.pinned" "desc" }} + {{ if not .Page.Params.archive }}
-

- {{ with .Page.Params.icon }} - {{ . }} - {{ end }} - 《{{ .Page.LinkTitle }}》 +

+ 《{{ .Page.LinkTitle }}》 + {{ if .Page.Params.pinned }}*{{ end }}

{{ .Page.Params.description | markdownify }}


+ {{ end }} {{ end }}
+

查看随笔 → diff --git a/layouts/_partials/taxonomy/archived-categories.html b/layouts/_partials/taxonomy/archived-categories.html new file mode 100644 index 00000000..26ed68d8 --- /dev/null +++ b/layouts/_partials/taxonomy/archived-categories.html @@ -0,0 +1,16 @@ +

+ diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html index 1a00ef86..600d4d03 100644 --- a/layouts/taxonomy.html +++ b/layouts/taxonomy.html @@ -6,6 +6,10 @@

文章系列

{{ partial "taxonomy/all-categories.html" . }} +
+

尘封的系列

+

这些文章系列已经不再更新。

+ {{ partial "taxonomy/archived-categories.html" . }} {{ partial "footer.html" . }} {{ end }} -- cgit v1.2.3