flavor is automatically expanded right before a multi-file render:
|
// expand flavor automatically to prevent requiring: |
|
// `{% set flavor = flavors[flavor] %}` |
|
// at the top of every template. |
|
if key == "flavor" { |
|
let flavor: catppuccin::FlavorName = value.parse()?; |
|
let flavor = &palette.flavors[flavor.identifier()]; |
|
ctx.insert("flavor", flavor); |
|
|
|
// also throw in the flavor's colors for convenience |
|
for (_, color) in flavor { |
|
ctx.insert(&color.identifier, &color); |
|
} |
|
} else { |
we may have to defer the expansion of accent to a second pass after the rest of the matrix has been expanded into the template context, since it's dependent on the flavour to get the correct colour object.
flavoris automatically expanded right before a multi-file render:whiskers/src/main.rs
Lines 555 to 567 in 9a7d0be
we may have to defer the expansion of
accentto a second pass after the rest of the matrix has been expanded into the template context, since it's dependent on the flavour to get the correct colour object.