Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Latest commit

 

History

History
24 lines (18 loc) · 864 Bytes

adding-a-new-schema.md

File metadata and controls

24 lines (18 loc) · 864 Bytes

Adding a new content schema

Create a file in formats named after your schema with a jsonnet extension. Eg for a case_study you'd create formats/case_study.jsonnet

With the following contents:

(import "shared/default_format.jsonnet") + {
}

You can then use the contents of the formats/_example.jsonnet as the basis of what to put into the file.

Once you have completed these file add the new format to allowed_document_types.yml. You can generate the corresponding schemas with the rake task.

Examples

Any new schema should also ship with a set of curated examples. These examples will be validated against the schema and can also be used by the corresponding frontend applications to verify that it can render examples of the schema. These examples should be added to the examples/FORMAT_NAME/frontend folder.