summaryrefslogtreecommitdiff
path: root/layouts/home.gmi
Commit message (Collapse)AuthorAge
* Link the homepage feed from the homepageNicholas Johnson10 hours
| | | | | | | | | | | | | | | | | | 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>
* End every template file with a newlineNicholas Johnson10 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>
* Fix empty entry heading on sites without journal entriesNicholas Johnson14 hours
| | | | | | | | | | | | 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>
* 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.