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, add degree under options.
- In
template.typ, add degree after frontmatter.
- In
my-custom-template.typ, add degree after frontmatter.
- In
my-custom-template.typ, for use, reference it with degree.
If we could have options in pubmatter, it could look like this:
- In
template.yml, add degree under options.
- In
template.typ, add degree in frontmatter.
- In
my-custom-template.typ, for use, reference it with fm.degree (or fm.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.
Since pubmatter does rigid checks on fields, currently, to add extra fields (
options) inside withfrontmatter. Could we imagine an extra fieldoptionswhich can be user-defined and either escape checks or be checked according to their specifications insidetemplate.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:template.yml, adddegreeunderoptions.template.typ, adddegreeafter frontmatter.my-custom-template.typ, adddegreeafter frontmatter.my-custom-template.typ, for use, reference it withdegree.If we could have
optionsinpubmatter, it could look like this:template.yml, adddegreeunderoptions.template.typ, adddegreein frontmatter.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_customso it makes checks according to rules based on input type rather than for specific input names.