diff options
| author | yingyu5658 <i@yingyu5658.me> | 2026-01-24 21:33:02 +0800 |
|---|---|---|
| committer | yingyu5658 <i@yingyu5658.me> | 2026-01-24 21:33:02 +0800 |
| commit | 0e7adf02310f08b72b98be670cc68a82a674e60b (patch) | |
| tree | 979bcb8cff0f17d2172f16cbe9f6328744c29325 /layouts | |
| parent | e9d7cfb909e9a495de9ee0f1829557a9eb95359b (diff) | |
| download | blog-0e7adf02310f08b72b98be670cc68a82a674e60b.tar.gz blog-0e7adf02310f08b72b98be670cc68a82a674e60b.zip | |
chore: add header in archives page
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/archives/single.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/layouts/archives/single.html b/layouts/archives/single.html index 6c43aac..698fc46 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -1,4 +1,5 @@ {{ define "main" }} +<header>{{- partial "header.html" . -}}</header> <content> {{ if .Site.Params.postSearch }} <input @@ -58,9 +59,10 @@ } }); </script> - {{ end }} {{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }} {{ - $excludePosts := where $allPosts "Params.categories" "intersect" (slice - "往昔") }} {{ $postPages := $allPosts | complement $excludePosts }} {{ if + {{ end }} {{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }} + {{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }} + + {{ $postPages := $allPosts | complement $excludePosts }} {{ if .Site.Params.showPostCount }} <p id="post-count">共有 {{ len $postPages }} 篇文章</p> {{ end }} |
