Metadata extensions
Custom metadata lets templates collect publication-specific fields while keeping the global project schema tidy. The optional metaData.schema.yml
lives beside configuration.sfo.yml
and follows standard JSON Schema semantics.
When to add metadata
- Journal templates usually add a small set of visual toggles. The reference
generic-journal
schema exposes a singlethemeColor
so header assets can pick up brand colours. - Monograph templates capture additional administrative data: faculty names, defence dates, or localisation defaults. Their metadata schema tends to be longer and may mark fields as required.
Document which components consume these fields. For example, a Handlebars header may look up meta.themeColor
, while a coverpage might render dissertation details.
Anatomy of the schema
# docs extracted from generic samples
_ui_icon: dataset
_readme: Templates can take on custom data that may be unique to the targeted publication.
type: object
properties:
themeColor:
type: string
title: Theme color
default: "#000000"
Key conventions:
- _ui_icon
controls how the form appears in the editor.
- _readme
provides author guidance; keep it short and link to internal standards if needed.
- properties
uses standard JSON Schema; set default
, enum
, or format
values to streamline data entry.
Wiring metadata into templates
- Create or update
metaData.schema.yml
in your template directory. - Document the required values in
spec.readme
so editors know when to fill them in. - Reference metadata via Handlebars helpers (
{{ meta.themeColor }}
) or component configuration (spec.theme.color
). - Test exports with and without metadata populated. Monograph workflows often expect these fields; make sure the template handles missing values gracefully.
Maintenance checklist
- Review metadata fields whenever you add a variant or asset that depends on them.
- Keep language in field titles consistent with the template’s default locale (e.g., German for the monograph sample).
- Avoid duplicating global metadata (DOI, authors) unless you need a specialised presentation.