<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hugo-theme-journal/layouts/_partials/head.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>Handle missing optional site files gracefully</title>
<updated>2026-09-19T23:00:02Z</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=d4ae7d9c03015778cdacbcbde52041b9dcbad7d92497529e9d460ddf42dcdb50'/>
<id>urn:sha256:d4ae7d9c03015778cdacbcbde52041b9dcbad7d92497529e9d460ddf42dcdb50</id>
<content type='text'>
Two site files the theme reads were assumed to exist. A site without
templates/logo.txt got an empty preformatted block at the top of every
page in both output formats, styled with the logo's margins, rather than
no logo at all. A typo in params.custom_css produced a nil pointer
error naming only the template line, since the result of resources.Get
was used without checking it.

Skip the header entirely when there is no logo, and report a missing
stylesheet by name.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Include the site title in page titles</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=7d240e17acc30398063991f7e2867a9938e19869c3dcc65f905d65e7d882ff0b'/>
<id>urn:sha256:7d240e17acc30398063991f7e2867a9938e19869c3dcc65f905d65e7d882ff0b</id>
<content type='text'>
Entry and taxonomy pages set the document title to the page title on its
own, so a bookmark, a browser tab or a search result gave no indication
of which site the page belonged to.

Append the site title everywhere except the homepage, where the two are
already the same.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Advertise Atom feeds to browsers and readers</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=57722d8190902f0c91f53317b3699a11cffb01b05cc28c3eadff83c244bba4eb'/>
<id>urn:sha256:57722d8190902f0c91f53317b3699a11cffb01b05cc28c3eadff83c244bba4eb</id>
<content type='text'>
The feeds were only reachable by following the visible link on a
taxonomy or term page, and the homepage did not link to its feed at all.
Without a rel="alternate" element in the document head, feed readers and
browser extensions cannot discover a feed from the page it belongs to.

Emit the link on any page that has an Atom output format, so each page
advertises its own feed rather than a hardcoded site-wide one.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Minify and fingerprint CSS stylesheet</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=ebb83f9f7a29c734b4c25d17f482345fc6b8b84565111483559d1fe02c778acb'/>
<id>urn:sha256:ebb83f9f7a29c734b4c25d17f482345fc6b8b84565111483559d1fe02c778acb</id>
<content type='text'>
This improves page performance and load times.
</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>
