mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 22:16:07 +01:00
Polist OPML and RSS feeds
This commit is contained in:
parent
5915df4ae9
commit
abf0ec191e
8 changed files with 180 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -435,3 +435,23 @@ figure {
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
33
content/reading-lists/_index.md
Normal file
33
content/reading-lists/_index.md
Normal file
|
@ -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
|
|
@ -28,7 +28,7 @@
|
|||
<line x1="10" y1="3" x2="8" y2="21"></line>
|
||||
<line x1="16" y1="3" x2="14" y2="21"></line>
|
||||
</svg>
|
||||
{{ len .Data.Pages }} posts
|
||||
{{ len .Data.Pages }} {{ .Kind | pluralize }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="author h-card hidden" aria-hidden="true">
|
||||
|
|
|
@ -134,6 +134,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M19.586 0c-.818 0-1.508.19-2.073.565-.563.377-.97.936-1.213 1.68a3.193 3.193 0 0 0-.112.437 8.365 8.365 0 0 0-.078.53 9 9 0 0 0-.05.727c-.01.282-.013.621-.013 1.016a31.121 31.123 0 0 0 .014 1.017 9 9 0 0 0 .05.727 7.946 7.946 0 0 0 .077.53h-.005a3.334 3.334 0 0 0 .113.438c.245.743.65 1.303 1.214 1.68.565.376 1.256.564 2.075.564.8 0 1.536-.213 2.105-.603.57-.39.94-.916 1.175-1.65.076-.235.135-.558.177-.93a10.9 10.9 0 0 0 .043-1.207v-.82c0-.095-.047-.142-.14-.142h-3.064c-.094 0-.14.047-.14.141v.956c0 .094.046.14.14.14h1.666c.056 0 .084.03.084.086 0 .36 0 .62-.036.865-.038.244-.1.447-.147.606-.108.385-.348.664-.638.876-.29.212-.738.35-1.227.35-.545 0-.901-.15-1.21-.353-.306-.203-.517-.454-.67-.915a3.136 3.136 0 0 1-.147-.762 17.366 17.367 0 0 1-.034-.656c-.01-.26-.014-.572-.014-.939a26.401 26.403 0 0 1 .014-.938 15.821 15.822 0 0 1 .035-.656 3.19 3.19 0 0 1 .148-.76 1.89 1.89 0 0 1 .742-1.01c.344-.244.593-.352 1.137-.352.508 0 .815.096 1.144.303.33.207.528.492.764.925.047.094.111.118.198.07l1.044-.43c.075-.048.09-.115.042-.199a3.549 3.549 0 0 0-.466-.742 3 3 0 0 0-.679-.607 3.313 3.313 0 0 0-.903-.41A4.068 4.068 0 0 0 19.586 0zM8.217 5.836c-1.69 0-3.036.086-4.297.086-1.146 0-2.291 0-3.007-.029v.831l1.088.2c.744.144 1.174.488 1.174 2.264v11.288c0 1.777-.43 2.12-1.174 2.263l-1.088.2v.832c.773-.029 2.12-.086 3.465-.086 1.29 0 2.951.057 3.667.086v-.831l-1.49-.2c-.773-.115-1.174-.487-1.174-2.264v-4.784c.688.057 1.29.057 2.206.057 1.748 3.123 3.41 5.472 4.355 6.56.86 1.032 2.177 1.691 3.839 1.691.487 0 1.003-.086 1.318-.23v-.744c-1.031 0-2.063-.716-2.808-1.518-1.26-1.376-2.95-3.582-4.355-6.074 2.32-.545 4.04-2.722 4.04-4.9 0-3.208-2.492-4.698-5.758-4.698zm-.515 1.29c2.406 0 3.839 1.26 3.839 3.552 0 2.263-1.547 3.782-4.097 3.782-.974 0-1.404-.03-2.063-.086v-7.19c.66-.059 1.547-.059 2.32-.059z"/></svg>
|
||||
{{- else if (eq .name "revolut") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M21.408 20.114c.449.999-.003 2.261-.94 2.77-.536.292-1.15.563-1.763.715a14.797 14.797 0 0 1-3.084.401c-1.662 0-3.329-.952-4.047-2.11-.185.4-.855 1.203-2.03 1.581-.741.24-1.635.529-3.502.527-1.673-.001-2.627-.76-3.13-1.396-.804-1.012-.922-2.298-.765-3.164l.008-.042c.631-3.167 1.494-8.925 1.892-11.81l.004-.028c.108-.8.219-1.6.285-2.406.032-.406.054-.814.058-1.221.004-.385-.031-.77-.028-1.154.004-.363.063-.73.233-1.052A2.391 2.391 0 0 1 5.917.619c.587-.196 1.2-.275 1.811-.346A48.39 48.39 0 0 1 9.604.086 31.823 31.823 0 0 1 11.9 0c1.31-.001 2.63.02 3.921.287 1.316.271 2.646.79 3.684 1.699.711.623 1.276 1.408 1.7 2.268.372.758.523 1.555.613 2.164a9.047 9.047 0 0 1-.124 3.286 7.203 7.203 0 0 1-.953 2.215c-.494.768-1.129 1.465-1.937 2.128.492 1.43 1.776 4.222 2.604 6.067zM6.688 2.922c.032.53.036 1.064.013 1.596a23.53 23.53 0 0 1-.13 1.626c-.06.538-.132 1.075-.205 1.611l-.024.175c-.23 1.677-.471 3.352-.725 5.024a280.578 280.578 0 0 1-.866 5.255c-.139.816-.45 1.861-.024 2.64.38.695 1.354.78 2.034.71 2.474-.253 2.867-.803 2.867-.803-.493-.547-.064-3.039.432-6.388h1.759l1.84 5.567s.543 1.724 2.05 1.641c1.932-.106 3.353-.548 3.558-.793-.595-.332-2.296-4.585-3.222-7.708.448-.274.883-.571 1.294-.904.56-.457 1.08-.984 1.477-1.603a4.75 4.75 0 0 0 .63-1.453 5.72 5.72 0 0 0 .125-.842 6.494 6.494 0 0 0-.046-1.486c-.07-.472-.173-.997-.383-1.422-.392-.797-.946-1.492-1.701-1.936-1.275-.75-2.745-.892-4.177-.97a26.434 26.434 0 0 0-4.657.152c-.174.02-1.926.175-1.918.31zm4.734 2.155c-.296 2.085-.533 3.842-.96 6.577 1.153-.025 3.77.434 4.346-3.304.477-3.11-1.649-3.398-3.386-3.273Z"/></svg>
|
||||
{{- else if (eq .name "rss") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
|
||||
{{- else if (eq .name "signal") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12.012 2.598c-5.22 0-9.452 3.9-9.452 8.709 0 3.016 1.219 5.301 3.155 6.774H5.71l.234 3.042v.004c0 .017 0 .031.004.046v.006c.024.144.15.255.301.255.053 0 .1-.015.144-.035l.011-.008L9.3 19.717c.854.196 1.767.299 2.71.299 5.22 0 9.452-3.899 9.452-8.71 0-4.81-4.233-8.709-9.454-8.709l.004.001zM10.39.72c.525-.065 1.061-.104 1.605-.104.38 0 .75.02 1.119.052l.057-.614C12.781.019 12.392 0 11.997 0c-.57 0-1.135.036-1.691.109l.083.612.001-.001zm3.797.094c.915.165 1.785.436 2.61.795l.252-.567c-.132-.056-.263-.112-.397-.165-.762-.3-1.551-.524-2.355-.671l-.11.608zm9.169 10.556c-.015.915-.155 1.806-.405 2.655l.59.175c.267-.903.416-1.854.431-2.831l-.616.001zM6.745 1.814c.811-.389 1.678-.698 2.586-.902L9.196.308c-.631.141-1.251.329-1.853.569-.297.117-.586.245-.867.381l.269.556zm13.65 1.399c-.706-.649-1.485-1.207-2.329-1.673l-.311.541c.811.445 1.561.981 2.224 1.596l.416-.462v-.002zm-5.244 18.838c.945-.24 1.845-.591 2.686-1.03l-.315-.533c-.786.413-1.631.738-2.521.967l.15.596zM3.677 4.005c.63-.638 1.347-1.2 2.13-1.675l-.327-.529c-.698.422-1.35.914-1.945 1.473-.102.094-.2.191-.3.289l.439.441.003.001zm19.48 11.28l-.568-.236c-.349.833-.803 1.614-1.354 2.332l.495.369c.577-.758 1.061-1.586 1.424-2.465h.003zM20.726 4.433c.606.675 1.122 1.425 1.534 2.228l.555-.275c-.435-.852-.979-1.645-1.627-2.366l-.465.413h.003zm2.554 3.003l-.568.244c.313.828.521 1.703.604 2.61l.615-.061c-.088-.956-.305-1.892-.651-2.793zM6.386 22.849l-.969.425-.332-1.025-.585.19.438 1.347c.029.083.09.151.167.188.041.017.083.026.126.026s.084-.009.123-.026l1.283-.563-.251-.562zm3.823-1.193c-.078-.016-.157-.027-.237-.041l-.465-.079c-.061-.009-.12 0-.172.023l-1.951.853.271.554 1.845-.803c.125.021.25.041.371.059.068.017.139.026.209.038l.129-.604zm3.728.02c-.633.104-1.281.156-1.942.156-.273 0-.525-.015-.772-.038l-.019.615c.251.024.511.04.791.04.698 0 1.383-.058 2.048-.166l-.104-.606-.002-.001zM1.517 7.116c.37-.825.852-1.598 1.425-2.302l-.47-.407c-.61.745-1.116 1.557-1.508 2.427l-.01.021.563.261zM20.532 18.21c-.612.651-1.31 1.229-2.07 1.728l.339.515c.806-.524 1.541-1.14 2.19-1.829l-.459-.414zM.97 14.551c-.188-.796-.293-1.676-.323-2.671H.031c.03 1.071.145 2.005.345 2.843l.594-.172zM.538 7.925c-.297.91-.468 1.853-.51 2.813l.615.03c.042-.923.209-1.816.487-2.662l-.592-.181zm4.199 13.26l-.59-1.815c-.02-.06-.056-.109-.105-.147-.232-.182-.449-.366-.66-.558l-.422.446c.194.184.408.362.629.541l.561 1.717.587-.184zm-2.105-3.292c-.591-.691-1.037-1.449-1.355-2.315l-.573.229c.041.107.083.216.126.322.33.796.771 1.509 1.342 2.175l.46-.411z"/></svg>
|
||||
{{- else if (eq .name "slack") -}}
|
||||
|
|
47
layouts/reading-lists/list.html
Normal file
47
layouts/reading-lists/list.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
{{ define "main" }}
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
|
||||
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
|
||||
{{ partial "memex-header.html" . }}
|
||||
|
||||
<hgroup class="post-title">
|
||||
<h1 class="p-name">
|
||||
{{ with .Params.emoji }}<span data-emoji="{{.}}"></span>{{end}}
|
||||
<a href="{{ .Permalink }}" class="noaccent u-url">{{ title (replace .Title "-" " ") }}</a>
|
||||
</h1>
|
||||
<ul class="feedlinks">
|
||||
<li><a href="./feeds.opml" target="_blank">{{ partial "svg.html" (dict "name" "rss") }}OPML feed</a></li>
|
||||
</ul>
|
||||
</hgroup>
|
||||
|
||||
{{ if .Content }}
|
||||
<div class="post-content e-content" data-pagefind-body data-pagefind-filter="type:{{.Type | title}}">{{ .Content }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range $paginator.Pages.GroupByDate "2006" }}
|
||||
<div class="posts-group">
|
||||
<div class="post-year">{{ .Key }}</div>
|
||||
|
||||
<ul class="posts-list">
|
||||
{{ range .Pages }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
|
||||
<span class="post-day">
|
||||
{{ if .Site.Params.dateformShort }}
|
||||
{{ .Date.Format .Site.Params.dateformShort }}
|
||||
{{ else }}
|
||||
{{ .Date.Format "Jan 2"}}
|
||||
{{ end }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination-list.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
|
@ -7,7 +7,19 @@
|
|||
</head>
|
||||
<body>
|
||||
{{ range .Pages -}}
|
||||
{{ if .Params.feed -}}
|
||||
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}" type="rss" xmlUrl="{{ .Params.feed.rss }}" htmlUrl="{{ .Params.feed.url }}" description="{{ .Summary }}"/>
|
||||
{{ end -}}
|
||||
|
||||
{{- if gt (len .Pages) 0 }}
|
||||
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}">
|
||||
{{ range .Pages -}}
|
||||
{{ if .Params.feed -}}
|
||||
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}" type="rss" xmlUrl="{{ .Params.feed.rss }}" htmlUrl="{{ .Params.feed.url }}" description="{{ .Summary }}"/>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</outline>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</opml>
|
||||
|
|
64
layouts/reading-lists/single.html
Normal file
64
layouts/reading-lists/single.html
Normal file
|
@ -0,0 +1,64 @@
|
|||
{{ define "main" }}
|
||||
<main class="post h-entry">
|
||||
|
||||
{{ partial "memex-header.html" . }}
|
||||
|
||||
<article>
|
||||
<hgroup class="post-title">
|
||||
<h1 class="p-name">
|
||||
{{ with .Params.emoji }}<span data-emoji="{{.}}"></span>{{end}}
|
||||
<a href="{{ .Permalink }}" class="noaccent u-url">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<ul class="feedlinks">
|
||||
<li><a href="{{.Params.feed.rss}}" target="_blank" rel="noopener">{{ partial "svg.html" (dict "name" "rss") }}Feed</a></li>
|
||||
{{ if .Params.feed.url }}<li><a href="{{.Params.feed.url}}" target="_blank" rel="noopener">{{ partial "svg.html" (dict "name" "web") }}Homepage</a></li>{{ end }}
|
||||
</ul>
|
||||
</hgroup>
|
||||
|
||||
{{ with .Summary }}
|
||||
<div class="post-summary p-summary" aria-hidden="true">{{ . }}</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.Cover }}
|
||||
<figure class="post-cover">
|
||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title }}" />
|
||||
|
||||
{{ if .Params.CoverCaption }}
|
||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
{{- if .Params.toc }}
|
||||
<hr />
|
||||
<aside id="toc">
|
||||
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
<hr />
|
||||
{{- end }}
|
||||
|
||||
<div class="post-content e-content" data-pagefind-body>
|
||||
{{ .Content | replaceRE `(\s)#([\w-]+)(\s)` `$1<a href="/tags/$2">$2</a>$3` | safeHTML }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr />
|
||||
|
||||
{{ partial "memex-footer.html" . }}
|
||||
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
<script src="/js/mermaid.js"></script>
|
||||
<script>
|
||||
// TODO: Render mermaid server side
|
||||
function initMermaid() {
|
||||
const dark = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
mermaid.initialize({ startOnLoad: true, theme: dark ? 'dark' : 'neutral' });
|
||||
}
|
||||
// https://github.com/mermaid-js/mermaid/issues/1945
|
||||
// window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', initMermaid);
|
||||
initMermaid();
|
||||
</script>
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
Loading…
Reference in a new issue