Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Each content entry can define the following keys:
| **`type`**| `string` | **Required**. `collection` or `file`, depending on whether the content entry is a collection of files with an identical schema (e.g. blog posts) or a single file (e.g. home page). |
| **`path`** | `string` | **Required**. Path to the folder where the files are stored if it's a collection (e.g. `path: src/posts`, otherwise the path to the single file (e.g. `path: src/index.md`). |
| **`fields`** | `string` | The list of fields defining the schema of the content entry (e.g. title, date, author, body, etc). [See the "Fields" section below](#fields). |
| **`filename`** | `string` | The pattern to generate the filename when creating a new file. This also defines how files are looked up. You can use the value of any field (e.g. `{{fields.title}}`) including nested values (e.g. `{{fields.tags[0].label}}`). You can also use a few date tokens (`{year}`, `{month}`, `{day}`) and time (`{hour}`, `{minute}`, `{second}`) and `{primary}` for the primary field as defined in the `view` key. By default this is set to `'{year}-{month}-{day}-{primary}.md'`. |
| **`filename`** | `string` | The pattern to generate the filename when creating a new file. This also defines how files are looked up. You can use the value of any field (e.g. `{fields.title}`) including nested values (e.g. `{fields.tags[0].label}`). You can also use a few date tokens (`{year}`, `{month}`, `{day}`) and time (`{hour}`, `{minute}`, `{second}`) and `{primary}` for the primary field as defined in the `view` key. By default this is set to `'{year}-{month}-{day}-{primary}.md'`. |
| **`exclude`** | `array` | An array of files to exclude from the collection (e.g. `[ README.md ]`). This is only valid for collections.
| **`view`** | `object` | **Only valid for collections**. This object defines the various options for the collection view; visible fields, sorting options and defaults, fields indexed for the search... [See the "View" section below](#view). |
| **`format`** | `string` | The format of the file, used to set up the editor to edit the content: `yaml-frontmatter`, `json-frontmatter`, `toml-frontmatter`, `yaml`, `json`, `toml`, `datagrid`, `code` or `raw`. It defaults to `yaml-frontmatter`. |
Expand Down Expand Up @@ -349,7 +349,6 @@ This allows you to apply global settings within this repository and branch.
| :---- | :------ | :-------------------------------------------------------------------------- |
| `hide` | `boolean` | If set to `true`, the "Settings" link/page will be hidden in the Pages CMS UI. |
| `content` | `object` | An object containing settings specifically related to content handling. |
| `content` | `object` | An object containing settings specifically related to content handling. |
| `content.merge` | `object` | Defaults to `false`. If set to `true`, when saving an existing content entry, the submitted fields will be merged with the fields already present in the file. Fields present only in the file will be preserved. Fields present in both will take the value from the submitted form. If `false`, the file content will be completely overwritten with the submitted form data (after processing according to the schema). This is helpful if you want to expose only parts of your file for editing. |

### Examples
Expand Down