Editing / Experience

Collection Defaults

Provide default front matter and/or content for new drafts and collection items. Defaults for collection item files are copied from _defaults.md in the root collection folder. Defaults files are hidden in the Explore section to prevent changes from non-developers and clients.

Set the default extension for new files to .html by using _defaults.html instead.

For example:

  • /_staff/_defaults.md contains defaults for new staff members
  • /_posts/_defaults.md contains defaults for new draft posts

New items created use these values. If the title and name attributes are present, they are set to the name used when a user creates a file.

Looking to set the default values for new array items? Use Array Structures instead.

arrow_back

Editing / Interfaces

Inputs

Read previous doc
arrow_forward

Editing / Experience

Editor Links

Read next doc