commit 6fd4b426ad3759f51d698e19f7c1f8f0062dcbbd
parent 3950b09c0334c160bf465ca40604946b5e473410
Author: David Eisinger <[email protected]>
Date: Tue, 13 Feb 2024 21:18:32 -0500
Full-text RSS
Diffstat:
6 files changed, 79 insertions(+), 5 deletions(-)
diff --git a/config.toml b/config.toml
@@ -12,6 +12,9 @@ email = '[email protected]'
[permalinks]
pages = '/:title'
+[services.rss]
+limit = 10
+
[markup.highlight]
style = 'nord'
diff --git a/content/elsewhere/friends-undirected-graph-connections-in-rails/index.md b/content/elsewhere/friends-undirected-graph-connections-in-rails/index.md
@@ -16,7 +16,7 @@ No, sorry, not THOSE friends. But if you're interested in how to do
some graph stuff in a relational database, SMASH that play button and
read on.
-<audio controls src="friends.mp3"></audio>
+<audio controls src="/elsewhere/friends-undirected-graph-connections-in-rails/friends.mp3"></audio>
My current project is a social network of sorts, and includes the
ability for users to connect with one another. I've built this
diff --git a/content/journal/dispatch-7-september-2023/index.md b/content/journal/dispatch-7-september-2023/index.md
@@ -52,7 +52,7 @@ The following weekend, we headed up to Rehoboth Beach in Delaware to spend the w
We also recorded this little jam featuring my 3.5-year-old niece on the melodica:
-<audio controls src="Nomi.mp3"></audio>
+<audio controls src="/journal/dispatch-7-september-2023Nomi.mp3"></audio>
From there, we drove 400 miles to Greensboro, and then onto Lake Norman to spend Labor Day weekend with Claire's family, a relaxing way to cap off an eventful summer.
diff --git a/content/journal/dispatch-8-october-2023/index.md b/content/journal/dispatch-8-october-2023/index.md
@@ -54,8 +54,8 @@ I had a birthday right before we left, and I decided to gift myself a [Novation
[6]: https://us.novationmusic.com/products/circuit-tracks
-<audio controls src="Demo 1.mp3"></audio>
-<audio controls src="Demo 2.mp3"></audio>
+<audio controls src="/journal/dispatch-8-october-2023/Demo 1.mp3"></audio>
+<audio controls src="/journal/dispatch-8-october-2023/Demo 2.mp3"></audio>
On that second one, the Circuit is using MIDI signals to play my [digital piano][7], which is then sending audio back into the Circuit. I'm just using the voice memos app (of all things) to record the output; I'll probably need to get a proper <abbr title="digital audio workstation">DAW</abbr> set up if I'm going to get more ambitious, but for now, it's pretty fun to create tracks with just a hardware device.
diff --git a/content/journal/dispatch-9-november-2023/index.md b/content/journal/dispatch-9-november-2023/index.md
@@ -60,7 +60,7 @@ I also made some updates to my [`golong`][8] tool to prep for a fantasy NBA draf
I'm still having a blast with the Novation Circuit Tracks I got last month. I came up with a track I actually really like, which I'm calling "Radiatus" (which is a [type of cloud][9]):
-<audio controls src="Radiatus.mp3"></audio>
+<audio controls src="/journal/dispatch-9-november-2023/Radiatus.mp3"></audio>
[9]: https://cloudatlas.wmo.int/en/clouds-varieties-radiatus.html
diff --git a/themes/v2/layouts/_default/rss.xml b/themes/v2/layouts/_default/rss.xml
@@ -0,0 +1,71 @@
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- $pctx := . }}
+{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- $pages := slice }}
+{{- if or $.IsHome $.IsSection }}
+{{- $pages = $pctx.RegularPages }}
+{{- else }}
+{{- $pages = $pctx.Pages }}
+{{- end }}
+{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- if ge $limit 1 }}
+{{- $pages = $pages | first $limit }}
+{{- end }}
+{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
+ <link>{{ .Permalink }}</link>
+ <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
+ <generator>Hugo -- gohugo.io</generator>
+ <language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
+ <managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
+ <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
+ <copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
+ <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
+ {{- with .OutputFormats.Get "RSS" }}
+ {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+ {{- end }}
+ {{- range $pages }}
+ <item>
+ <title>{{ .Title }}</title>
+ <link>{{ .Permalink }}</link>
+ <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+ {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
+ <guid>{{ .Permalink }}</guid>
+ <description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
+ </item>
+ {{- end }}
+ </channel>
+</rss>