template Requires type: custom
listing
template: was set but type: is not custom; the built-in template for the declared type is used instead.
Q-12-7 — template: Requires type: custom
template:was set buttype:is notcustom; the built-in template for the declared type is used instead.
What this means
A listing’s template: key points at a custom template file
(a doctemplate — see the Listings guide) that Quarto uses to render
each item. The key only has an effect when type: custom —
otherwise the listing uses one of the four built-in templates
(default, grid, table, …) and there is no point at which
the custom template would be consulted.
When you set template: on a non-custom type, Quarto warns and
ignores the template — the built-in for the declared type
renders the listing.
Why this happens
Two common causes:
- Migration from Quarto 1, where some templates were attached to non-custom types in a way Quarto 2 does not preserve.
- A copy-paste mistake that combined fields from two
listings without keeping the matching
type:.
How to fix
Either set type: custom (so the template is used) or remove
the template: line (if you wanted the built-in for the
declared type all along).