<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hugo-theme-journal/layouts, 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>Link the tag list from the homepage</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=8796113e6933d54710e8534264710f6797e0fda8325783c9052d4b7024a80301'/>
<id>urn:sha256:8796113e6933d54710e8534264710f6797e0fda8325783c9052d4b7024a80301</id>
<content type='text'>
Tags reach a dead end in gemtext. The entry metadata names them, but a
gemtext link must occupy a whole line, so the names are plain text and
the tag pages the theme generates cannot be reached from the homepage
at all. The web homepage links each entry's own tags inline, yet
neither format links the tag list itself, so a site had to add it to
the navigation links by hand.

Add a tags section to both homepage templates, holding a single link to
the taxonomy list page, and place it between the navigation links and
the feed. One link rather than one per term keeps the homepage short
however many tags a site accumulates, and keeps the two output formats
in step.

Render it only when the taxonomy page exists and has terms, so that a
site whose entries carry no tags, or which disables the taxonomy kinds
outright, gains no heading and no dead link.

The link is labelled from a new "tagList" string rather than reusing
"tags", which would have read as a link named after the heading above
it. As elsewhere in the theme, the taxonomy is found by lowercasing the
"tags" string, so a translated site finds its own taxonomy: an example
site built in Spanish links "Lista de etiquetas" under "Etiquetas".

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Link the homepage feed from the homepage</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=b2e2ebef4f5f304884cbf86e73a000d6ee2d0a32a421e5aa55662a2255f7e364'/>
<id>urn:sha256:b2e2ebef4f5f304884cbf86e73a000d6ee2d0a32a421e5aa55662a2255f7e364</id>
<content type='text'>
The homepage was the one listing page with a feed but no link to it, so
a reader could only find it through the autodiscovery element in the
document head, which the capsule has no equivalent of. Sites worked
around this by adding the feed to the navigation links by hand.

Add a feeds section to both homepage templates, modelled on the one the
taxonomy, term and section templates carry, and place it below the
navigation links and above the entry list. As on those pages, it is
rendered only when the home kind lists the Atom output format, so a
site that omits the format gains nothing to link.

The example site's homepage gains the section in both output formats
and is otherwise byte-identical, as are the pages of every other kind.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add Atom feeds for sections</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=9f3a9875caaded223901896f5302731d825cc0e77b54b45c2eab670f6e226b40'/>
<id>urn:sha256:9f3a9875caaded223901896f5302731d825cc0e77b54b45c2eab670f6e226b40</id>
<content type='text'>
Sections were the one listing kind without a feed of their own, though
the section templates already linked one whenever the output format was
configured. Add the two feed templates, modelled on the taxonomy and
term ones, and turn the format on for sections in the example site.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>End generated capsule pages 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=708309f9c25dd69d85833edf410a7a777fdf056ebdf6042f3539520313960452'/>
<id>urn:sha256:708309f9c25dd69d85833edf410a7a777fdf056ebdf6042f3539520313960452</id>
<content type='text'>
The templates gained a final newline, but the gemtext pages they build
did not: the base template trimmed its own away, so every .gmi file
ended mid-line and was not a POSIX text file either. The web pages and
the feeds already ended with one.

Stop trimming the newline after the footer partial in the gemtext base
template. The footer partial keeps its own trim marker, so that the
newline is emitted once rather than twice.

Every generated file in the example site, gemtext and web alike, now
ends with exactly one newline, and the capsule pages are otherwise
byte-identical.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<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>Add section templates</title>
<updated>2026-09-19T23:21:32Z</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=0703a10e2c97bdce5fe8c2d83ce977b015bc68b2368eb43c3b3bdbc21d588155'/>
<id>urn:sha256:0703a10e2c97bdce5fe8c2d83ce977b015bc68b2368eb43c3b3bdbc21d588155</id>
<content type='text'>
Every build logged "found no layout file for html for kind section",
and the section URL that Hugo generates for the entry directory was
rendered as an empty page in both output formats. The warning was left
for each site using the theme to work around.

List the section's pages the way the term templates do, and link the
section feed when the site configures one.

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>Ignore blank lines between front matter and entry body</title>
<updated>2026-09-19T22:26:10Z</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=40d957cfbe3c4791145a35cba1004a6ea30b45ac9e0dbc4eee3577c2d981ee04'/>
<id>urn:sha256:40d957cfbe3c4791145a35cba1004a6ea30b45ac9e0dbc4eee3577c2d981ee04</id>
<content type='text'>
.RawContent keeps the newline that follows the closing front matter
delimiter, and only trailing whitespace was being chomped. An entry
written with a blank line there, which is what the entry archetype
produces, got one more blank line under its pageinfo line in the
gemtext than an entry written without one.

The same leading newline also hid a heading on the first line from the
check that decides whether to add a separating newline, since that
pattern is anchored to the start of the content.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Drop scripting URL schemes from links and images</title>
<updated>2026-09-19T20:34:32Z</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=61d07d87a9b54cd102699e065a349d5c3fc4a06fbe7a96c255e43aa182c02be7'/>
<id>urn:sha256:61d07d87a9b54cd102699e065a349d5c3fc4a06fbe7a96c255e43aa182c02be7</id>
<content type='text'>
Both render hooks passed the destination through safeURL, which bypasses
the sanitising that html/template would otherwise apply, so a
javascript: or data:text/html destination in Markdown became a live
scripting URL in the page. That matters for any site built from content
its author did not write.

safeURL cannot simply be dropped: it is what allows gemini:// and other
schemes html/template does not recognise to survive, which this theme
depends on. Reject the scripting schemes explicitly instead, render the
link text on its own, and warn during the build so the author can see
what was dropped. data: is still allowed for images, where it is a
legitimate way to inline one.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
