The Include Template field type allows you include fields that you have already specified in another front matter template.
This can be useful for organizing your front matter and consolidating frequently-used fields: for example, including an
seo front matter template that contains description, keyword, and thumbnail data.
- Label — the human-friendly label shown above the input field in the editor
- Name — this field is not used for this field type
- Description — a human-friendly description of what the field does and/or instructions for your editors
- Hidden — hides the filed in the editor; but allows developers to set default values or maintain the field for legacy purposes.
- Template — the front matter template whose fields you wish to include.
You can configure this field in Front Matter Template Config Files as follows:
type: include template: seo # The slug of the included front matter template label: SEO name: seo
- Create a new front matter template, let’s name it “seo” and add the needed fileds, for instance: title, description, image, permalink, etc.
- In another front matter template, insert an include field and choose the “seo” template.
- Now your main front matter template contains the included template.
You can pickup a field from an include template as the display field in the main front matter template settings.
The user interface and file output are flat, your front matter looks exactly the same as if you don’t use an include template.
Caught a mistake or want to contribute to the docs? Edit this page on Github!