-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Since pubmatter does rigid checks on fields, currently, to add extra fields (options) inside with frontmatter. Could we imagine an extra field options which can be user-defined and either escape checks or be checked according to their specifications inside template.yml?
The issue is that currently, if you add extra options, you also need to add the options separately in the custom template. Not a massive issue, but add adds some confusion if you think you're relying on pubmatter for all your input from template.yml.
E.g. say I want to add degree. Currently, the workflow is this:
- In
template.yml, adddegreeunderoptions. - In
template.typ, adddegreeafter frontmatter. - In
my-custom-template.typ, adddegreeafter frontmatter. - In
my-custom-template.typ, for use, reference it withdegree.
If we could have options in pubmatter, it could look like this:
- In
template.yml, adddegreeunderoptions. - In
template.typ, adddegreein frontmatter. - In
my-custom-template.typ, for use, reference it withfm.degree(orfm.options.degree).
Another idea would be to create another class that handles loading of extra fields, e.g. load_custom so it makes checks according to rules based on input type rather than for specific input names.