allowedFields
An array with the names of the allowed fields. If any of the fields sent is not part of this list, the entry will be discarded and an error will be thrown.
Example:
Default:
The site configuration file for Staticman should be in the root of the repository hosting the static website and named staticman.yml
(in the now deprecated v1 this file was named _config.yml
). The following parameters are accepted.
See the sample site config file for an example.
The values of some parameters need to be protected from the public eye, so they’re encrypted with a public key associated with the Staticman API instance — these are flagged with the RSA encrypted field string. See the Encryption section for further details.
An array with the names of the allowed fields. If any of the fields sent is not part of this list, the entry will be discarded and an error will be thrown.
Example:
Default:
When allowedOrigins is defined, only requests sent from one of the listed domains will be accepted.
Example:
Default:
Whether to use Akismet to check entries for spam. This requires an Akismet account to be configured in the Staticman API instance being used.
Default:
Name of the field to be used as the entry’s author in Akismet
Default:
Name of the field to be used as the entry’s author’s email in Akismet
Default:
Name of the field to be used as the entry’s author’s URL in Akismet
Default:
Name of the field to be used as the entry’s body in Akismet
Default:
Type of entry to be sent to Akismet
Default:
Whether (oauth) authentication is required for an entry to be accepted
Default:
Name of the branch being used within the GitHub repository.
Default:
Text to be used as the commit message when pushing entries to the GitHub repository.
Default:
The extension to be used in the generated data files (defaults to the extension associated with the format
field)
Default:
Name for the data files being uploaded to the repository. You can use placeholders (denoted by curly braces), which will be dynamically replaced with the content of a field (e.g. {fields.name}
), the content of an option (e.g. {options.slug}
) or other dynamic placeholders such as the entry’s unique id ({@id}
).
Default:
Format of the data files being uploaded to the repository.
Possible values:
yaml
yml
json
frontmatter
Default:
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:
🔐 RSA encrypted field
The client ID to the GitHub Application used for GitHub oauth authentication.
🔐 RSA encrypted field
The client secret to the GitHub Application used for GitHub oauth authentication.
The URL to redirect to after oauth authentication with GitHub.
Default:
(DEPRECATED: Use auth.required
instead.) Whether authentication is required for an entry to be accepted.
Default:
🔐 RSA encrypted field
The client ID to the GitLab Application used for GitLab oauth authentication.
🔐 RSA encrypted field
The client secret to the GitLab Application used for GitLab oauth authentication.
The URL to redirect to after oauth authentication with GitHub.
Default:
Base URL for the OneDev API.
Default:
Username for the OneDev API.
Default:
Password or Access Token for the OneDev API.
Default:
When set to true
, a pull request with the data files will be created to allow site administrators to approve or reject an entry. Otherwise, entries will be pushed to branch
immediately.
Default:
Human-friendly name of the property/website. This is used in notification emails.
Example:
Default:
Whether email notifications are enabled. This allows users to subscribe to future comments on a thread. A Mailgun account is required.
Default:
🔐 RSA encrypted field
Mailgun API key
🔐 RSA encrypted field
Mailgun domain
Path to the directory where entry files are stored. You can use placeholders (denoted by curly braces), which will be dynamically replaced with the content of a field (e.g. {fields.name}
), the content of an option (e.g. {options.slug}
) or other dynamic placeholders such as the entry’s unique id ({@id}
).
Default:
Text to be used as the pull request body when pushing moderated entries.
Default:
An array with the names of the fields that must be supplies as part of an entry. If any of these is not present, the entry will be discarded and an error will be thrown.
Default:
List of transformations to be applied to any of the fields supplied. It consists of an object where keys correspond to the names of the fields being transformed. The value determines the type of transformation being applied.
Example:
Set to true
to force reCAPTCHA validation, set to false
to accept comments without reCAPTCHA.
Default:
Site Key for your reCAPTCHA site registration
Default:
🔐 RSA encrypted field
Encrypted Secret for your reCAPTCHA site registration
Default: