Trash bin GitHub logo Information Right arrow Staticman title Staticman

Home / Documentation /

Generated Fields

generatedFields

List of fields to be appended to entries automatically. It consists of an object where keys correspond to the names of the fields being created and values being of mixed type. If values are objects, Staticman will look for a type and options keys inside and perform different operations based on their type; otherwise, the value will be used directly as the content of the generated field.

Example:

generatedFields:
  someField: "some string" # Simple field (string)
  date: # Extended field (date)
    type: date
    options:
      format: "timestamp-seconds"

type: date

Populate the value with the current date.

Available options:

format:

type: slugify

Transform the value via slug (with the default options), then converting to lower case.

No options available.