From e03422873a1788137f120d9c8f34b2be079f0aee Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 2 Aug 2024 13:23:35 +0800 Subject: docs: build with hugo --- themes/hugo-xmag/layouts/_default/list.html | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 themes/hugo-xmag/layouts/_default/list.html (limited to 'themes/hugo-xmag/layouts/_default/list.html') diff --git a/themes/hugo-xmag/layouts/_default/list.html b/themes/hugo-xmag/layouts/_default/list.html new file mode 100644 index 0000000..5c1ac2c --- /dev/null +++ b/themes/hugo-xmag/layouts/_default/list.html @@ -0,0 +1,52 @@ +{{ partial "header.html" . }} + +
+
+{{ $pages := .Pages }} +{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }} +{{ $paginator := .Paginate (where $pages "Section" "!=" "") }} +{{ range $paginator.Pages }} +
+
+ {{ with .Params.categories }} + {{ range first 1 . }} + {{ . }} + {{ end }} + {{ else }} + {{ default "Uncategorized" .Site.Params.text.uncategorized }} + {{ end }} +
+

{{ .Title }}

+
+ {{ if .Params.author }}{{ partial "author_names.html" . }} / {{ end }} + {{ .Date.Format "2006-01-02" }} +
+ + {{ end }} + {{ end }} + {{ end }} + {{ with .Description }} + {{ $.Scratch.Set "summary" (markdownify .) }} + {{ else }} + {{ $.Scratch.Set "summary" ((delimit (findRE "((.|\n)*?

\\s*)+" .Content) "[…] ") | plainify | truncate (default 200 .Site.Params.summary_length) (default " …" .Site.Params.text.truncated ) | replaceRE "&" "&" | safeHTML) }} + {{ end }} + {{ $.Scratch.Get "summary" }} +
+
+ +{{ end }} + + + + +{{ partial "footer.html" . }} -- cgit v1.2.3-70-g09d2