-
Notifications
You must be signed in to change notification settings - Fork 0
Metadata
cr4te metadata lives in cr4te.json files beside the folders they describe. Metadata files contain editable structured metadata only. Long-form descriptions belong in README.md.
The build command creates and reconciles metadata before rendering:
- Missing creator and project files are created.
- Missing editable keys are added.
- Existing editable values are preserved.
- Inactive creator type branches are pruned.
- Empty stale project facets are pruned.
- Stale project facets with values are kept as a domain-change failsafe.
Creator metadata has a type and one active type-specific branch.
Person creator:
{
"name": "Astra Vey",
"type": "person",
"portrait": "portrait.png",
"aliases": [],
"collaborations": [],
"tags": {},
"person": {
"active_since": "2015",
"birth": {
"date": "1986-01",
"place": "Berlin"
},
"death": {
"date": "",
"place": ""
},
"civil_name": "",
"nationalities": ["Swiss"]
}
}Collaboration creator:
{
"name": "Marin & The Mesa",
"type": "collaboration",
"portrait": "",
"aliases": [],
"collaborations": [],
"tags": {},
"collaboration": {
"active_since": "",
"members": ["Joe Duldree", "Kurt Monroe"],
"founding": {
"date": "",
"place": ""
},
"dissolution_date": "",
"nationalities": []
}
}When type is person, the collaboration branch is removed. When type is collaboration, the person branch is removed.
If you change a creator from person to collaboration, or from collaboration to person, run build again. The rebuild reconciles the JSON file so the active branch gets the right fields and the inactive branch is removed.
Automatic creator type detection only happens when type is missing. If a creator folder name contains one of the configured collaboration separators, such as & or , by default, cr4te treats it as a collaboration. A band named The Foobars does not contain a separator, so it is treated as a person unless you set "type": "collaboration" explicitly.
Project metadata stores core fields plus domain/config-driven facets:
{
"title": "Glass Circuit",
"release_date": "2021-03-08",
"cover": "extras/cover.png",
"tags": {
"Mood": ["Luminous"]
},
"facets": {
"genres": ["Electro-pop"],
"labels": ["Orbit"],
"instruments": ["Synth"]
}
}facets are generic project metadata fields such as genres, labels, actors, publishers, or instruments. The active facet set comes from the resolved configuration.
Dates accept only valid calendar dates in one of these forms:
yyyyyyyy-mmyyyy-mm-dd
Display preserves stored precision. A year displays as a year, a month displays as month and year, and a full date displays with day, month, and year.
portrait and cover can override automatically selected images.
Rules:
- Relative paths are resolved from the metadata file's folder.
- Paths must point inside the input library.
- Paths must point to existing files.
If no override is set, cr4te selects images using the configured portrait and cover rules.
Tags are free-form category-to-list mappings:
{
"tags": {
"Mood": ["Luminous", "Nocturnal"],
"Era": ["2020s"]
}
}Tags appear on pages and feed search/filter links.
Extra or obsolete fields fail validation. By default, invalid creators or projects are reported as build issues and skipped where possible. With --strict, metadata errors fail the build immediately.