From 0535960a7dd37ebf355e44d8819c651c70ffb11f Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 9 Oct 2026 02:54:30 +0800 Subject: Add RSS feed for technical note updates Signed-off-by: Richard Qin --- layouts/notes/list.rss.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 layouts/notes/list.rss.xml (limited to 'layouts/notes/list.rss.xml') diff --git a/layouts/notes/list.rss.xml b/layouts/notes/list.rss.xml new file mode 100644 index 0000000..6125ac4 --- /dev/null +++ b/layouts/notes/list.rss.xml @@ -0,0 +1,39 @@ +{{- $items := slice -}} +{{- range where site.RegularPages "Section" "notes" -}} + {{- if not .Params.updated -}} + {{- errorf "Missing required updated date in %s" .File.Path -}} + {{- end -}} + {{- $sortKey := printf "%s|%s" (.Lastmod.Format "2006-01-02T15:04:05-0700") .RelPermalink -}} + {{- $items = $items | append (dict "page" . "sortKey" $sortKey) -}} +{{- end -}} +{{- $items = sort $items "sortKey" "desc" -}} +{{ printf "" | safeHTML }} + + + {{ site.Params.owner }} — Notes Updates + {{ .Permalink }} + New and substantially revised technical notes by {{ site.Params.owner }}. + + {{- with $items }} + {{ (index . 0).page.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{- end }} + {{- range $items }} + {{- $page := .page -}} + {{- $title := $page.Title -}} + {{- if $page.Params.series -}} + {{- $title = printf "%s — %s" $page.Parent.Title $page.Title -}} + {{- end -}} + {{- $summary := $page.Plain | strings.Truncate 200 -}} + {{- with $page.Params.description -}} + {{- $summary = . | plainify -}} + {{- end -}} + + {{ $title }} + {{ $page.Permalink }} + {{ printf "%s#updated-%s" $page.Permalink ($page.Lastmod.Format "2006-01-02") }} + {{ $page.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{ $summary }} + + {{- end }} + + -- cgit v1.2.3