<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hugo-theme-journal/layouts/single.html, branch 2026.09.19</title>
<subtitle>Hugo theme for my journal.</subtitle>
<id>https://git.nicholasjohnson.ch/hugo-theme-journal/atom?h=2026.09.19</id>
<link rel='self' href='https://git.nicholasjohnson.ch/hugo-theme-journal/atom?h=2026.09.19'/>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/'/>
<updated>2026-09-20T00:00:00Z</updated>
<entry>
<title>End every template file with a newline</title>
<updated>2026-09-20T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-20T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=a221ae3c6f8da11b12eea4246f5792123c501f221f0e708456c0a5dd24c8d8a0'/>
<id>urn:sha256:a221ae3c6f8da11b12eea4246f5792123c501f221f0e708456c0a5dd24c8d8a0</id>
<content type='text'>
Fifteen templates ended without a final newline, so they were not text
files by the POSIX definition: tools that read whole lines, including
sed, wc -l, read and shells' command substitution, drop or mangle the
last line, and diffs of them carry a "\ No newline at end of file"
marker that hides which side changed.

Add the newline. The gemtext output may not change, so the four
templates whose last action is emitted verbatim into a capsule page
trim it away again with "-}}". The templates that end by closing a
define block need no marker, since the newline then falls outside the
block and is never executed, as section.gmi and single.gmi already
showed.

The capsule builds byte-identical gemtext and the feeds are unchanged.
Web pages gain the trailing newline their templates now have, which
ends the generated HTML with an EOL too.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Drop whitespace trimming from HTML and XML templates</title>
<updated>2026-09-20T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-20T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=93831052e8ba9537d47474e1f8dbf04d9eceb9b0dff214ce422fcafe1ffaecac'/>
<id>urn:sha256:93831052e8ba9537d47474e1f8dbf04d9eceb9b0dff214ce422fcafe1ffaecac</id>
<content type='text'>
Whitespace has no effect on the HTML and Atom output, so the trim
markers on nearly every action in those templates bought nothing and
made them harder to read and to edit: a maintainer had to carry the
markers along with the change. The markers are load-bearing in the
gemtext templates alone, where output whitespace is the formatting.

Remove them from the HTML and Atom templates. The audio partial keeps
its markers, since the gemtext single template uses it too. The two
markup render hooks keep theirs as well, because their output is
spliced inline into prose, where the newlines an untrimmed hook emits
render as a space before the punctuation that follows a link.

The Atom templates compute their author and entry variables before
emitting anything, so untrimmed they put blank lines ahead of the XML
declaration and left every feed malformed. Emit the declaration first
instead; whitespace is allowed after it but not before it.

The example site builds byte-identical gemtext and content-identical
feeds, and its HTML differs only by a space after a "p" start tag that
the whitespace processing model drops.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Choose the best audio version of an entry</title>
<updated>2026-09-19T20:15:23Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-18T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=424afe0f8fed829758cc4d09722b4cfd98268734f82b799962369478389cf5dc'/>
<id>urn:sha256:424afe0f8fed829758cc4d09722b4cfd98268734f82b799962369478389cf5dc</id>
<content type='text'>
Both templates took element 0 of the entry's audio resources, so an
entry carrying more than one encoding used whichever filename sorted
first, with no way to express a preference. An entry with a careful
encoding and an mp3 beside it would commonly have offered the mp3.

Order the resources by how they sound instead. Public listening tests
put Opus ahead of the field at the bitrates spoken word uses, with
Vorbis and AAC close behind it and MP3 last; the lossless formats come
after the lossy ones rather than before, since a browser that can play
FLAC would otherwise fetch several times the bytes for no audible gain.
Formats the theme does not rank keep Hugo's own order at the end.

The capsule links the first of them, since a Gemini client cannot
choose between sources and a reader wants one file to fetch. The
website offers them all as the alternative sources that the audio
element exists to choose between, best first, so a browser plays the
best encoding it understands.

Hugo reports .opus, .oga and .ogg alike as audio/ogg, so the ordering
keys off the file extension rather than the media type.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Fix entry heading anchors on page bundles</title>
<updated>2026-09-19T20:06:44Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-18T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=4f22a1ee6092762ee116dc09b3cea66b181e3efffe22eb56037c6e41b11757d8'/>
<id>urn:sha256:4f22a1ee6092762ee116dc09b3cea66b181e3efffe22eb56037c6e41b11757d8</id>
<content type='text'>
The heading id came from .File.TranslationBaseName, which is "index"
for every leaf bundle. Since audio versions require an entry to be a
bundle, every entry with audio got the same meaningless anchor, and
pages built by a content adapter would have taken the name of the
directory holding the adapter.

Derive the id from the page's own URL instead. Single file entries keep
the anchors they already had, and bundles, adapter built pages and
custom slugs now each get their own.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add audio support for entries on website</title>
<updated>2026-09-06T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-06T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58'/>
<id>urn:sha256:151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move pageinfo below heading for website</title>
<updated>2026-09-06T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-06T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=47f8f43cab34bc4048fb93124c13df9643befb4d5abb4a9e97cff064a97e342d'/>
<id>urn:sha256:47f8f43cab34bc4048fb93124c13df9643befb4d5abb4a9e97cff064a97e342d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace ".Name" with ".Title" for entry headings</title>
<updated>2026-09-06T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2026-09-05T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=ed01d97ca07622a4adf87fc4e806c083c7d624b2ce463eef588149c86110077c'/>
<id>urn:sha256:ed01d97ca07622a4adf87fc4e806c083c7d624b2ce463eef588149c86110077c</id>
<content type='text'>
I'm not sure if this change makes a difference, but .Title seems to be
the canonical option in this context.
</content>
</entry>
<entry>
<title>Make footer stick to bottom of page</title>
<updated>2025-07-27T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2025-07-27T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=36199a037c6324e86ca1f0f6d0c43e38fa9ffbd1467de13e29aea7d59cdee9cc'/>
<id>urn:sha256:36199a037c6324e86ca1f0f6d0c43e38fa9ffbd1467de13e29aea7d59cdee9cc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Migrate fully to Hugo's new template system</title>
<updated>2025-07-26T00:00:00Z</updated>
<author>
<name>Nicholas Johnson</name>
<email></email>
</author>
<published>2025-07-26T00:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.nicholasjohnson.ch/hugo-theme-journal/commit/?id=9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3'/>
<id>urn:sha256:9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3</id>
<content type='text'>
This was the only way I could get term pages to consistently render
correctly.
</content>
</entry>
</feed>
