summaryrefslogtreecommitdiff
path: root/bin/main.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 10:32:33 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 10:32:44 +0200
commitb90678e560808dd788fa7d7eb319d93a83005db4 (patch)
tree73bbd6e35e3e99e5c6ad769ae0ceb02853fa5b2c /bin/main.ml
parent2760d43d695ba08fc33f65357590675707b6570d (diff)
downloadcolitur-b90678e560808dd788fa7d7eb319d93a83005db4.tar.gz
colitur-b90678e560808dd788fa7d7eb319d93a83005db4.zip
docs(render): template reference, install rules, typesetting check
colitur-templates.5 documents the four syntax forms, the six flavours and their escaping, and the full view-model field reference. It states plainly that there are no partials, no raw form and no expression evaluation -- a template is data, never a program. It documents two real hazards found during this build, not theoretical ones: the outward scope fallback silently shadowing an inner name/num key with an outer one of the same name (with the safe {{#name}}...{{^la}} idiom), and the engine's lack of host-comment awareness (a {{...}} inside a LaTeX %, groff .\" or HTML <!-- --> comment is still parsed as a tag). It also states the limitation rather than hiding it: AsciiDoc and Markdown are not escaped, so a feast name containing * or _ renders as emphasis. templates/ and schema/ now install into <prefix>/share/colitur/, matching data/ef/, via new install stanzas; colitur-templates.5 installs to man5 beside colitur-overlay.5. Verified against a scratch prefix: the installed binary resolves both from the prefix, not the source tree, when run from an unrelated working directory. make check-templates typesets every shipped template through pdflatex and groff when they are installed, and prints SKIPPED loudly when they are not. Golden tests prove templates render; only this proves they typeset. A silent skip would read as a pass. Fixed a real doc/help drift while here: bin/main.ml's --help still said --overlay was accepted on day and readings only, three commands out of date (emit, table/render and publish all accept it too), disagreeing with the man page's own OVERLAYS section, which carried the identical stale line. Both are corrected; --overlay's own behaviour is unchanged.
Diffstat (limited to 'bin/main.ml')
-rw-r--r--bin/main.ml18
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/main.ml b/bin/main.ml
index 1669a47..4f1fbf2 100644
--- a/bin/main.ml
+++ b/bin/main.ml
@@ -763,9 +763,9 @@ overlays:
the shipped universal one, never instead of it, so local feasts
add to it rather than replacing it. Later files win over earlier
ones, and over the universal calendar, when they name the same
- slug. Accepted on `day` and `readings` only -- the other commands
- read no sanctoral data, so the flag is refused there rather than
- silently ignored.
+ slug. Accepted on `day`, `readings`, `emit`, `table`, `render` and
+ `publish` -- `easter` and `temporal` read no sanctoral data, so
+ the flag is refused there rather than silently ignored.
An overlay is applied, NOT validated: colitur's test layers assert
things about the shipped calendar and cannot vouch for a file you
@@ -804,8 +804,11 @@ rendering:
renders against is the same schema `emit` uses (season, week,
slug, rank, colour, subject, names, citations, commemorations),
reshaped into a booklet (`days`) and a month grid (`weeks`, with
- padding cells for the leading/trailing blanks); see colitur(1)
- for the full field list.
+ padding cells for the leading/trailing blanks); see
+ colitur-templates(5) for the full field list, the syntax and the
+ scope-shadowing hazard (an inner key silently loses to an outer
+ key of the same name -- a bare {{name.la}} inside a day resolves
+ to the enclosing MONTH's name, not the day's own).
--flavour X selects how interpolated VALUES are escaped (never the
template's own literal markup, which is the author's). One of:
@@ -882,7 +885,10 @@ exit status:
Reading references only (e.g. "Jn 3:16"); never scripture text.
See colitur(1) for the full description and the sources it computes against,
-and colitur-overlay(5) for the overlay file format in full.|}
+colitur-overlay(5) for the overlay file format in full, and
+colitur-templates(5) for the template format in full -- the syntax, the
+scope-shadowing hazard, the six flavours' escaping, and the full view-model
+field reference.|}
let print_help () =
print_endline help_text;