From abf0ec191e8eb5a734a42e4e99e76fa0e57261c5 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Tue, 24 Oct 2023 19:51:59 +0100 Subject: [PATCH] Polist OPML and RSS feeds --- assets/scss/_main.scss | 3 +- assets/scss/_single.scss | 20 ++++++++++ content/reading-lists/_index.md | 33 +++++++++++++++ layouts/partials/memex-header.html | 2 +- layouts/partials/svg.html | 2 + layouts/reading-lists/list.html | 47 ++++++++++++++++++++++ layouts/reading-lists/list.opml | 12 ++++++ layouts/reading-lists/single.html | 64 ++++++++++++++++++++++++++++++ 8 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 content/reading-lists/_index.md create mode 100644 layouts/reading-lists/list.html create mode 100644 layouts/reading-lists/single.html diff --git a/assets/scss/_main.scss b/assets/scss/_main.scss index 40f89609..ab208cfa 100644 --- a/assets/scss/_main.scss +++ b/assets/scss/_main.scss @@ -96,7 +96,6 @@ h1 { h2 { font-size: 1.625rem; - margin-top: 2.5em; } h3 { @@ -461,7 +460,7 @@ ol ol { display: flex; flex-direction: column; flex: 1 auto; - align-items: center; + // align-items: center; justify-content: center; margin: 0; diff --git a/assets/scss/_single.scss b/assets/scss/_single.scss index 22d5a767..d352663b 100644 --- a/assets/scss/_single.scss +++ b/assets/scss/_single.scss @@ -434,4 +434,24 @@ figure { .tags { list-style-type: none; margin: 0 0 0 2em; +} + +.feedlinks { + margin: 0; + list-style: none; + font-size: 1rem; + + li { + display: inline-block; + margin-right: 2rem; + vertical-align: middle; + + svg { + color: var(--accent); + margin-right: 0.3rem; + vertical-align: -0.125em; + width: 1em; + height: 1em; + } + } } \ No newline at end of file diff --git a/content/reading-lists/_index.md b/content/reading-lists/_index.md new file mode 100644 index 00000000..08ba7dee --- /dev/null +++ b/content/reading-lists/_index.md @@ -0,0 +1,33 @@ +--- +title: Reading lists +date: 2023-10-24 08:08:08 BST +summary: The collection of RSS feeds I subscribe to, parcelled up so you can subscribe easily too. +outputs: +- html +- rss +- opml +--- + +A while ago I spotted a [fediverse post](https://social.masto.land/@dave/111273568591273761) from [Dave Winer](http://scripting.com/?tab=about) that talked about _reading lists_. + +> **What is a reading list?** +> +> A reading list is a list of feeds you can subscribe to. +> +> The author of the list can add or remove feeds. When they do, people who subscribe to the list are subscribed to the new feeds and unsubbed from the ones that leave. + +I hadn't previously seen this described, but I've been looking for a way to share the blogs/feeds I follow on this site for some time (especially as I tried to figure out if a static site can operate as a [microsub server](https://indieweb.org/Microsub#IndieWeb_Examples) — it can't really). So in this (slightly hidden, for now) section of my site you'll find a number of collections of feeds, all of which I follow and read when I have a quiet moment. + +## Following + +If you'd like to use them, you can find a page under this one for every feed I follow that includes the RSS feed and homepage of the site. + +On the category pages you can _also_ find links to 'OPML files', which contain links to **all** the feeds in that category — any good feed reader application (I use [Reeder 5](https://www.reederapp.com/)) should be able to let you import all of them at once. + +Dave also mentioned an interesting quirk of 'reading lists' in his post: + +> Technically a reading list is exactly the same format as a subscription list. The only difference is you import a subscription list, and you subscribe to a reading list. + +So if, like me, you use a tool like [FreshRSS](https://www.freshrss.org/) (which is _superb_, and easy to run with [Yunohost](https://yunohost.org/) and even a cheap [Raspberry Pi](https://www.raspberrypi.com/)) you can subscribe to a "Dynamic OPML" (the name that FreshRSS gives it), and your _list of feeds_ will update as I add to them here (as well as the items in each of the feeds). + +## Current reading lists diff --git a/layouts/partials/memex-header.html b/layouts/partials/memex-header.html index 9a6fc04e..90d4e643 100644 --- a/layouts/partials/memex-header.html +++ b/layouts/partials/memex-header.html @@ -28,7 +28,7 @@ - {{ len .Data.Pages }} posts + {{ len .Data.Pages }} {{ .Kind | pluralize }}

{{ end }}
+ {{ partial "memex-header.html" . }} + +
+

+ {{ with .Params.emoji }}{{end}} + {{ title (replace .Title "-" " ") }} +

+ +
+ + {{ if .Content }} +
{{ .Content }}
+ {{ end }} + + {{ range $paginator.Pages.GroupByDate "2006" }} + + {{ end }} + {{ partial "pagination-list.html" . }} +
+{{ end }} diff --git a/layouts/reading-lists/list.opml b/layouts/reading-lists/list.opml index f19d1ee2..28180646 100644 --- a/layouts/reading-lists/list.opml +++ b/layouts/reading-lists/list.opml @@ -7,7 +7,19 @@ {{ range .Pages -}} + {{ if .Params.feed -}} + {{ end -}} + + {{- if gt (len .Pages) 0 }} + + {{ range .Pages -}} + {{ if .Params.feed -}} + + {{ end -}} + {{ end -}} + + {{ end }} {{ end }} diff --git a/layouts/reading-lists/single.html b/layouts/reading-lists/single.html new file mode 100644 index 00000000..9ce8ba42 --- /dev/null +++ b/layouts/reading-lists/single.html @@ -0,0 +1,64 @@ +{{ define "main" }} +
+ + {{ partial "memex-header.html" . }} + +
+
+

+ {{ with .Params.emoji }}{{end}} + {{ .Title | markdownify }} +

+ +
+ + {{ with .Summary }} + + {{ end }} + + {{ if .Params.Cover }} +
+ {{ .Title }} + + {{ if .Params.CoverCaption }} +
{{ .Params.CoverCaption | markdownify }}
+ {{ end }} +
+ {{ end }} + + {{- if .Params.toc }} +
+ +
+ {{- end }} + +
+ {{ .Content | replaceRE `(\s)#([\w-]+)(\s)` `$1$2$3` | safeHTML }} +
+
+ +
+ + {{ partial "memex-footer.html" . }} + + {{ if .Page.Store.Get "hasMermaid" }} + + + {{ end }} +
+{{ end }}