From 33c8bbe0b2b011291b48dcd93478cbc310ab3f3f Mon Sep 17 00:00:00 2001 From: ionous Date: Mon, 22 Sep 2025 20:19:48 -0700 Subject: [PATCH] prototyping a recent changes page appears at /news/changes/ --- site/content/news/changes.md | 8 ++++++++ site/layouts/calchanges/single.html | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 site/content/news/changes.md create mode 100644 site/layouts/calchanges/single.html diff --git a/site/content/news/changes.md b/site/content/news/changes.md new file mode 100644 index 00000000..d7fa23f2 --- /dev/null +++ b/site/content/news/changes.md @@ -0,0 +1,8 @@ +--- +title: "Recent Changes" +description: "Recent Changes" +type: calchanges + +--- + +# Recent Changes \ No newline at end of file diff --git a/site/layouts/calchanges/single.html b/site/layouts/calchanges/single.html new file mode 100644 index 00000000..7e6149b0 --- /dev/null +++ b/site/layouts/calchanges/single.html @@ -0,0 +1,25 @@ +{{ define "page_body" }} +
+

Releases

+{{/* or commits: https://github.com/shift-org/shift-docs/commits/main.atom */}} +{{ $url := "https://github.com/shift-org/shift-docs/releases.atom" }} +{{ with try (resources.GetRemote $url) }} + {{ with .Err }} + {{ errorf "%s" . }} + {{ else with .Value }} + {{ $data := . | transform.Unmarshal }} + {{ range $data.entry }} +

{{ .title }}

+ {{ index .link "-href" }} + {{/* probably safe to use the raw html. + we're the only ones creating releases */}} + {{ index .content "#text" | safe.HTML }} + {{ end }} + {{/* debug display the data on screen */}} +
{{ debug.Dump $data }}
+ {{ else }} + {{ errorf "Unable to get remote resource %q" $url }} + {{ end }} +{{ end }} +
+{{ end }} \ No newline at end of file