hairy text templates

Overview of Bit Powder text templates, called hair, and is like handlebars and mustache (and the earlier ctemplate original). In short the features and syntax:

binexpr expressions can be used instead of values as above (think of expressions, functional calls, selectors, etc). This utility supports also Lua in the templates. Prefix anywhere a value is accepted with lua: to run Lua code (with current value in this).

There are a couple of special functions added to the Binary Object expressions:

[listing example] [[ []{.flex-fill} [ ==[](example)== ]{.me-2} [ example combining markdown with text templates. ]{.flex-shrink-1} []{.flex-fill} ]]{.d-flex; .align-items-start; .mx-auto; .col-md-8; margin-top: -1rem; .mb-3}
{{define cardfeature defaults {fillHeight: true, dark: false, photoHideBreakpoint: "md"}}}
[[{.card{{if !dark}}; .light{{end}}}
  {{=eval(body, this)}}

{{call cardfeature with {
  dark: true,
  icon: "calendar-star",
  title: "Upcoming",
  body: compile(|
    On **Tuesday 1 December** from **16:00 - 17:30**, *X* will present her recently published book 'XYZ'.
  buttonLeft: {icon: "sign-in", name: "join", href: "http://"},
  buttonRight: {icon: "calendar", name: "calendar feed", href: "http://"}