Overrides
The frontmatter and/or even the palette colors themselves can be overriden in every Whiskers template. This is particularly useful when customising an existing port generated by Whiskers.
Frontmatter Overrides
Section titled “Frontmatter Overrides”Frontmatter overrides can be specified through the CLI via the --overrides
flag, taking in a JSON string resembling the frontmatter.
For example, this template uses a default border_color
of mauve
:
---whiskers: version: "^X.Y.Z" filename: "example.yml"border_color: "mauve"---theme: border_color: "{{flavor.colors[border_color].hex}}"
However, when running:
$ whiskers example.tera -f mocha --overrides '{"border_color": "pink"}'
the border_color
will be overridden to pink
.
A “real world” example is catppuccin/cosmic-desktop, where the frontmatter has customisation options which can be overridden by the user.
Color Overrides
Section titled “Color Overrides”Color overrides can be specified through the cli via the --color-overrides
flag. This flag takes a JSON string like the following:
{ "all": { "text": "ff0000" }, "mocha": { "base": "000000", "mantle": "010101", "crust": "020202" }}
Using these overrides would set the text
color to bright red for all flavors,
and the base
, mantle
, and crust
colors to black/near-black for Catppuccin
Mocha.