diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-09-10 00:41:20 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-09-10 00:41:20 +0800 |
| commit | 85db458aa1042a458df5c5a25d70dd06655c924a (patch) | |
| tree | 84cfa7e1e8cb911adb7e6b5065d45a76e28c033e /layouts/partials/recent.html | |
| parent | 9b94708706dd397bb808a6347591e7636263bb67 (diff) | |
Add updated document archive
Diffstat (limited to 'layouts/partials/recent.html')
| -rw-r--r-- | layouts/partials/recent.html | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/layouts/partials/recent.html b/layouts/partials/recent.html index 47c8332..cbe91af 100644 --- a/layouts/partials/recent.html +++ b/layouts/partials/recent.html @@ -1,18 +1,8 @@ -{{- $items := slice -}} -{{- range where site.RegularPages "Section" "journal" -}} - {{- $items = $items | append (dict "page" . "kind" "journal" "sortDate" (.Date.Format "2006-01-02")) -}} -{{- end -}} -{{- range where site.RegularPages "Section" "notes" -}} - {{- $page := . -}} - {{- with $page.Params.recent -}} - {{- $items = $items | append (dict "page" $page "kind" "note" "sortDate" (time.Format "2006-01-02" .)) -}} - {{- end -}} -{{- end -}} -{{- $items = sort $items "sortDate" "desc" -}} +{{- $items := partial "updated-items.html" . -}} <section class="recent" aria-labelledby="recent-title"> <h2 id="recent-title">RECENT</h2> <ol class="document-list"> - {{- range $items }} + {{- range first site.Params.recentLimit $items }} <li> <time datetime="{{ .sortDate }}">{{ .sortDate }}</time> <span class="document-kind">[{{ .kind }}]</span> @@ -20,4 +10,5 @@ </li> {{- end }} </ol> + <p class="recent-more"><a href="{{ "updates/" | relURL }}">Read more</a></p> </section> |
