| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Nothing the theme reads was written down: the parameters, the front
matter keys, the output formats each page kind needs and the two
optional site files all had to be found by reading the templates. The
readme pointed at another repository for guidance instead.
List them, and point at the example site for a working pair of
configuration files. Also state the minimum Hugo version, which was
only recorded in theme.toml.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The theme shipped no runnable site and documented no configuration, so
every setting it reads had to be discovered by reading the templates,
and there was nothing to build against when changing them. The build
failure that unset RSS limits caused would have been caught immediately
by an example site.
The two configuration files are the separate website and capsule
configurations the readme asks for, annotated with what each setting
does and which are optional. The content demonstrates entries, tags,
references, a standalone page and the front matter keys that control
them.
Also ignore build output, which no rule previously covered.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
.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 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The page declared no colour scheme, so browsers styled their own widgets
for a light page against this theme's dark one. That was invisible until
entries gained audio, since the audio player is the first user interface
control the theme renders; scrollbars and form controls were affected
too.
Also give keyboard users the highlight that pointer users get on hover,
and let long words break in list items, blockquotes and headings rather
than only in paragraphs, so that a long URL cannot push the layout
sideways. Preformatted blocks keep scrolling instead of breaking.
The empty rulesets left as block placeholders are removed; the html and
body colours are deliberately different and are untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The Atom output formats were declared against "application/atom", which
is not a registered media type; the registered one is
"application/atom+xml". Nothing downstream currently depends on it,
since the served content type is decided by the .xml suffix, but the
declaration was wrong and .MediaType reported it to templates.
Feed filenames and locations are unchanged.
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.
|
| |
|
|
|
| |
ReadingTime is directly passed to the i18n fn, so the correct format for
the i18n string is simply "{{ . }}", not "{{ .Count }}".
|
| |
|
|
| |
Less visual clutter, improves readability.
|
| |
|
|
|
| |
A changelog should provide information about changes between versions,
not link to releases.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Changing box-sizing from content-box to border-box caused the body width
to account for padding, so it has to be added back in order to get the
full 72 chars in the main content.
|
| |
|
|
|
| |
The page content area's background color should always fill the height
of the viewport, even if there is not enough page content.
|
| | |
|
| | |
|
| |
|
|
| |
This makes it more visually clear where the content begins and ends.
|
| | |
|
| |
|
|
|
| |
This Hugo theme no longer supports the Hugo versions that can utilize
the key "site.Author", so this code never executes.
|
| |
|
|
|
| |
This Hugo theme no longer supports Hugo versions less than 0.123.0, so
this code never executes.
|