| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The "Journal Entries" heading was guarded by .Site.RegularPages while
the list below it was filtered to the "entry" section. A site with pages
but no entries rendered the heading with nothing under it.
Guard on the filtered collection instead. This also drops the .ByTitle
sort, which was immediately discarded by the .ByPublishDate.Reverse
that followed it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
| |
Every listing in the theme is built from .PublishDate, but the feeds
timestamped entries with .Date and left them in Hugo's default order.
An entry that set both front matter keys was therefore advertised to
readers with a different date, and potentially in a different order,
than it appeared in on the site.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The homepage lists only pages in the "entry" section, but its feeds
ranged over every regular page. Standalone pages such as an about page
were therefore published to subscribers while never appearing on the
homepage itself.
Apply the same section filter the homepage templates use, so the feed
and the page it describes agree on what an entry is.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
| |
RFC 4287 requires every feed to carry an atom:author unless all of its
entries carry one. Entries here never do, and the feed-level author was
emitted only when params.author was set, so any site that did not set it
published feeds that no conforming validator accepts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The chunking regex required at least one character before a preformatted
block, so a block starting on the first line of an entry could never
match the preformatted branch and fell through to the prose branch. Its
contents were then run through the prose substitutions: asterisks were
stripped, ordered list items were rewritten as unordered ones and links
were turned into references, inside text that must be reproduced
verbatim.
Allow the leading segment to be empty. Blocks elsewhere in an entry,
multiple blocks and reference numbering are unaffected.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Hugo's default for services.rss.limit is -1 (unlimited), and passing a
negative length to "first" aborts the build with "sequence length must
be non-negative". Every feed template did this unconditionally, so any
site that did not explicitly set services.rss.limit failed to build at
all, rather than degrading to an unlimited feed.
Only apply "first" when a positive limit is configured, which is the
same guard Hugo's own internal RSS template uses.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This improves page performance and load times.
|
| |
|
|
|
| |
I'm not sure if this change makes a difference, but .Title seems to be
the canonical option in this context.
|
| |
|
|
| |
Less visual clutter, improves readability.
|
| | |
|
| | |
|
| |
|
|
|
| |
This Hugo theme no longer supports the Hugo versions that can utilize
the key "site.Author", so this code never executes.
|
| |
|
|
|
| |
This was the only way I could get term pages to consistently render
correctly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hugo's template system was reimplemented in Hugo version 0.146.0.
"We [the Hugo developers] have aimed to maintain as much backward
compatibility as possible by mapping "old to new," but some reported
breakages have occurred."
Reference: https://gohugo.io/templates/new-templatesystem-overview/
The "mapping "old to new,"" is not yet documented, but moving the
taxonomy and term layouts to layouts/_default seems to be sufficient to
properly generate this theme on Hugo versions later than 0.146.0.
To retain backward compatibility with older Hugo versions, the other
recommended changes to the layouts directory are not made.
Reference: https://gohugo.io/templates/new-templatesystem-overview/#changes-to-the-layouts-folder
|
| |
|
|
|
|
| |
The spaces in tag names must be non-breaking because tag names
split across multiple lines are visually indistinguishable from distinct
tags.
|
| |
|
|
|
|
| |
Spaces are more aesthetically pleasing. The Gemtext output format cannot
remove the commas because then there would be no way to distinguish tags
containing spaces from distinct tags.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The spaces directly following emojis must be non-breaking because having
emojis alone on their own line is ugly and visually confusing.
The spaces within pageinfo "segments" must be non-breaking because
splitting dates and read times across multiple lines is ugly and
visually confusing.
|
| |
|
|
|
| |
It's good practice to keep static website assets isolated to their own
subdirectory.
|
| |
|
|
|
| |
This removes the extra iterations over reference numbers caused by using
the replace function.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This avoids littering the gemtext templates with regex to change the
protocol.
|
| |
|
|
| |
This avoids littering the gemtext templates with "safeHTML".
|
| |
|
|
|
|
|
| |
Timestamp obfuscation is a niche privacy feature which contradicts how
users expect Hugo to work. If the user desires such a feature, they can
override the theme with their own custom timestamp-obfuscating
archetypes.
|
| |
|
|
|
|
|
| |
The entry archetype already wipes the time of day of entries and
converts their dates to UTC, for the sake of user privacy. If the user
overrides this behavior and purposely includes times and/or time zones,
the theme should not interfere.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Elements which are optional in the Atom feed spec should also be
optional in the templates.
|
| | |
|
| | |
|