aboutsummaryrefslogtreecommitdiff
path: root/layouts/baseof.gmi
Commit message (Collapse)AuthorAge
* End generated capsule pages with a newlineNicholas Johnson16 hours
| | | | | | | | | | | | | | | | | 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>
* End every template file with a newlineNicholas Johnson16 hours
| | | | | | | | | | | | | | | | | | | | | 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>
* Handle missing optional site files gracefullyNicholas Johnson17 hours
| | | | | | | | | | | | | | 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>
* Migrate fully to Hugo's new template systemNicholas Johnson2025-07-26
This was the only way I could get term pages to consistently render correctly.