- Description:
This key defines additional data placeholders for use in create path templates.
The value is an object where each property is a string that specifies a data placeholder. Entry values follow the same format as
path, and are processed sequentially beforepath. These values are not saved back to your file.For more information, please read our documentation on Create Paths.
- Appears in:
└── create └── extra_data- Type:
Object<extra_data.*>- Values:
This key represents an individual extra data property in the
create.extra_dataobject.The value is a string that specifies a data placeholder for use in create path templates. Entry values follow the same format as
path, and are processed sequentially beforepath. These values are not saved back to your file.Show examplesHide examples
In this example, we have configured an extra data property
filenamethat combines date and title fields for use in the create path.Copied to clipboardcollections_config: blog: create: extra_data: filename: '{date|year}-{date|month}-{date|day}-{title}' path: '[relative_base_path]/{filename|slugify}.[ext]'{ "collections_config": { "blog": { "create": { "extra_data": { "filename": "{date|year}-{date|month}-{date|day}-{title}" }, "path": "[relative_base_path]/{filename|slugify}.[ext]" } } } }- Examples:
In this example, we have configured extra data placeholders to generate a filename from date and title fields for use in the create path.
Copied to clipboardcollections_config: blog: create: extra_data: filename: '{date|year}-{date|month}-{date|day}-{title}' path: '[relative_base_path]/{filename|slugify}.[ext]'{ "collections_config": { "blog": { "create": { "extra_data": { "filename": "{date|year}-{date|month}-{date|day}-{title}" }, "path": "[relative_base_path]/{filename|slugify}.[ext]" } } } }