| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|