Rework Notes page: balanced two columns, filter, bibliography section, drop prev/next links

This commit is contained in:
tdehaeze committed 2026-10-17 21:49:47 +02:00
1 parent 0699938cd5
commit 2490e8bbb1
10 files changed
+364 -30

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
{{- $p := . -}}
{{- $raw := $p.RawContent -}}
{{- $author := $p.Params.ref_author | default "" -}}
{{- if not $author }}{{ with findRE `(?m)^Author\(s\)\r?\n: (.+)$` $raw 1 }}{{ $author = replaceRE `^Author\(s\)\r?\n: ` "" (index . 0) }}{{ end }}{{ end -}}
{{- $author = $author | replaceRE `&` "&" | strings.TrimSpace -}}
{{- $year := $p.Params.ref_year | default "" -}}
{{- if not $year }}{{ with findRE `(?m)^Year\r?\n: (\d{4})` $raw 1 }}{{ $year = replaceRE `^Year\r?\n: ` "" (index . 0) }}{{ end }}{{ end -}}
{{- $notes := slice -}}
{{- range findRE `relref "[^"]+\.md"` $raw -}}
{{- $base := . | replaceRE `^relref "(?:.*/)?([^"/]+)\.md"$` "$1" -}}
{{- with site.GetPage (printf "/zettels/%s" $base) }}{{ $notes = $notes | append . }}{{ end -}}
{{- end -}}
{{- return (dict "author" $author "year" (string $year) "notes" $notes) -}}