diff options
| author | eltrac <hi@eltr.ac> | 2026-03-08 10:59:50 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-08 10:59:50 +0800 |
| commit | 1a5242df3e9e91ef69b497634080d9f9e13f64ec (patch) | |
| tree | ff65575a34b755fd884d3e9444fb5eb2aafe8541 /layouts/archive.html | |
| parent | c2d010d29aa4ff651ff1234af699bc9a1cd4debf (diff) | |
docs: new archive page
group by year and add pagefind search bar
Diffstat (limited to 'layouts/archive.html')
| -rw-r--r-- | layouts/archive.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/layouts/archive.html b/layouts/archive.html index 764f0879..87bafab2 100644 --- a/layouts/archive.html +++ b/layouts/archive.html @@ -1,11 +1,15 @@ {{ define "main" }} <article> {{ partial "header" . }} - {{ partial "home/home-nav" . }} + {{ partial "taxonomy/pagefind" . }} <div class="post-content text-size-lg"> - <ol class="mx-0 my-4 p-0 leading-loose flex flex-col-reverse"> - {{ range (.Site.RegularPages | collections.Reverse) }} - {{ if eq .Language .Site.Language }} + {{ range .Site.RegularPages.GroupByDate "2006" }} + {{ partial "components/section-title" (dict + "Left" .Key + "Right" (T "archivePage.pageCount" (len .Pages)) + )}} + <ol class="mx-0 my-4 p-0 leading-loose flex flex-col"> + {{ range .Pages }} <li class="list-decimal text-secondary lazy-render"> <div class="flex justify-between"> <a href="{{ .Permalink }}">{{ .LinkTitle }}</a> @@ -13,8 +17,8 @@ </div> </li> {{ end }} - {{ end }} </ol> + {{ end }} </div> </article> {{ partial "footer.html" . }} |
