From 231fe3c9f213206492516434858af362cc09901d Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Wed, 5 May 2021 09:12:24 +0200 Subject: [PATCH] prettified rss xml using pretty-feed xsl --- content/subscribe.md | 4 +- static/pretty-feed-v3.xsl | 141 ++++++++++++++++++ .../layouts/_default/rss.xml | 3 +- 3 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 static/pretty-feed-v3.xsl diff --git a/content/subscribe.md b/content/subscribe.md index 3d2f1cbf..5c4bdef6 100644 --- a/content/subscribe.md +++ b/content/subscribe.md @@ -6,7 +6,9 @@ aliases: - /feed --- -If you like receiving updates on all things Brain Baking, you can simply subscribe to one of the _RSS feeds_ below. Freshly baked thoughts and ideas, served in your own favorite news reader, how about that? I like [NetNewsWire](https://netnewswire.com/), which comes with a catchy slogan: +If you like receiving updates on all things Brain Baking, you can simply subscribe to one of the _RSS feeds_[^rss]. Freshly baked thoughts and ideas, served in your own favorite news reader, how about that? I like [NetNewsWire](https://netnewswire.com/), which comes with a catchy slogan: + +[^rss]: Read on [aboutfeeds.com](https://aboutfeeds.com/) how these RSS web feeds work in detail. > More news, less junk. Faster. diff --git a/static/pretty-feed-v3.xsl b/static/pretty-feed-v3.xsl new file mode 100644 index 00000000..724269b9 --- /dev/null +++ b/static/pretty-feed-v3.xsl @@ -0,0 +1,141 @@ + + + + + + + + <xsl:value-of select="/rss/channel/title"/> Web Feed + + + + + + +
+
+

+ + + + + + + + + + + + + + + + + + + Web Feed Preview +

+

+

+ + + + + Visit Website → + +
+

Recent Items

+ +
+

+ + + + + + +

+ + Published: + +
+
+
+ + +
+
diff --git a/themes/brainbaking-minimal/layouts/_default/rss.xml b/themes/brainbaking-minimal/layouts/_default/rss.xml index ef95aedb..33f9f550 100644 --- a/themes/brainbaking-minimal/layouts/_default/rss.xml +++ b/themes/brainbaking-minimal/layouts/_default/rss.xml @@ -13,7 +13,8 @@ {{- $pages = $pages | first $limit -}} {{- end -}} {{- printf "" | safeHTML }} - +{{- printf "" | safeHTML }} + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }}