| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
|
|
This was the only way I could get term pages to consistently render
correctly.
|