summaryrefslogtreecommitdiff
path: root/lib/template.source.sh
AgeCommit message (Collapse)Author
2026-03-01Extract generate::extract_title helper to eliminate duplicationPaul Buetow
Title extraction ($SED pattern + quote sanitization) was duplicated in generate, atomfeed, gemfeed, notes, and template modules. Now centralized with unit tests for heading extraction and empty files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01Add error context to eval-based template processingPaul Buetow
Template eval failures now log the template file path and the failing code block/line, making it much easier to debug syntax errors in .gmi.tpl templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01Extract generate::safe_overwrite helper to eliminate DRY violationPaul Buetow
The "safe overwrite" pattern (diff -q tmp dest, then rm or mv) was duplicated in template, gemfeed (2x), and notes modules. Extracted into a shared helper with unit tests covering all three cases (no dest, identical dest, differing dest). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15Improve --generate performance with incremental builds (62s -> 2s)Paul Buetow
Add mtime-based skip logic to avoid regenerating unchanged files: - generate::fromgmi skips .gmi files where all outputs are newer - template::_generate_file skips templates when output is fresh - Diff-before-overwrite in templates, gemfeed, and notes indexes to preserve mtimes and prevent cascading cache invalidation - Global dependency check (.lastgen sentinel) for header/footer/CSS - Job throttling via wait -n capped at nproc cores - Add --force flag and FORCE_REBUILD env var to bypass skip logic - Fix misleading atom feed "empty cache" log message Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2025-08-05fix bare blocks so lines in there can start with [[Paul Buetow
2025-07-09feat: auto-detect language for source-highlightPaul Buetow
2025-02-02swapPaul Buetow
2025-02-02intro of rindex inline templatePaul Buetow
2024-12-30fix toc when there are tags in themPaul Buetow
2024-08-26typoPaul Buetow
2024-08-26fixPaul Buetow
2024-08-26add ToC suggesterPaul Buetow
2024-08-24change toc format and fix a bugPaul Buetow
2024-08-24initial atom.xml fixesPaul Buetow
2024-08-24nicer ToC for HTMLPaul Buetow
2024-04-30add id's to the headers in html, for ToC references laterPaul Buetow
2024-04-21ignore bare blocks for toc generationPaul Buetow
2024-04-21fixPaul Buetow
2024-04-21add TOC generator to the templating engine.Paul Buetow
2024-03-30inline index is case-insensitivePaul Buetow
2023-08-19change inline template sortingPaul Buetow
2023-03-25also add publishing date to .tpl postsPaul Buetow
2023-03-25draft also generates .gmi files from draft templatesPaul Buetow
2023-03-25can also use "<< <<< and >>>" from templates themselvesPaul Buetow
2023-03-25exclude draftPaul Buetow
2023-03-24can specify multiple index topics for template::inline::indexPaul Buetow
2023-03-24add template::indexPaul Buetow
2023-03-20Hallo should be Hello!Paul Buetow
2023-03-20fix evil evalPaul Buetow
2023-03-20reset block after usePaul Buetow
2023-03-20add support for multiline templatePaul Buetow
2023-03-15fix cache bugPaul Buetow
2023-03-15initial templating supportPaul Buetow