Feature/remove editorial workflow (#8)
This commit is contained in:
committed by
GitHub
parent
5e6164efc4
commit
10b442428a
@ -26,29 +26,6 @@ The `backend` option specifies how to access the content for your site, includin
|
||||
|
||||
**Note**: no matter where you access Simple CMS — whether running locally, in a staging environment, or in your published site — it will always fetch and commit files in your hosted repository (for example, on GitHub), on the branch you configured in your Simple CMS config.yml file. This means that content fetched in the admin UI will match the content in the repository, which may be different from your locally running site. It also means that content saved using the admin UI will save directly to the hosted repository, even if you're running the UI locally or in staging. If you want to have your local CMS write to a local repository, try the `local_backend` setting, [currently in beta](/docs/beta-features/#working-with-a-local-git-repository).
|
||||
|
||||
## Publish Mode
|
||||
|
||||
By default, all entries created or edited in the Simple CMS are committed directly into the main repository branch.
|
||||
|
||||
The `publish_mode` option allows you to enable "Editorial Workflow" mode for more control over the content publishing phases. All unpublished entries will be arranged in a board according to their status, and they can be further reviewed and edited before going live.
|
||||
|
||||
**Note:** Editorial workflow works with GitHub repositories, and support for GitLab and Bitbucket is [in beta](/docs/beta-features/#gitlab-and-bitbucket-editorial-workflow-support).
|
||||
|
||||
You can enable the Editorial Workflow with the following line in your Simple CMS `config.yml` file:
|
||||
|
||||
```yaml
|
||||
# /admin/config.yml
|
||||
publish_mode: editorial_workflow
|
||||
```
|
||||
|
||||
From a technical perspective, the workflow translates editor UI actions into common Git commands:
|
||||
|
||||
| Actions in Simple CMS UI | Perform these Git actions |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| Save draft | Commits to a new branch (named according to the pattern `cms/collectionName/entrySlug`), and opens a pull request |
|
||||
| Edit draft | Pushes another commit to the draft branch/pull request |
|
||||
| Approve and publish draft | Merges pull request and deletes branch |
|
||||
|
||||
## Media and Public Folders
|
||||
|
||||
Simple CMS users can upload files to your repository using the Media Gallery. The following settings specify where these files are saved, and where they can be accessed on your built site.
|
||||
@ -148,16 +125,6 @@ When a translation for the selected locale is missing the English one will be us
|
||||
|
||||
> All locales are registered by default (so you only need to update your `config.yml`).
|
||||
|
||||
## Show Preview Links
|
||||
|
||||
[Deploy preview links](../deploy-preview-links) can be disabled by setting `show_preview_links` to `false`.
|
||||
|
||||
**Example:**
|
||||
|
||||
```yaml
|
||||
show_preview_links: false
|
||||
```
|
||||
|
||||
## Search
|
||||
|
||||
The search functionally requires loading all collection(s) entries, which can exhaust rate limits on large repositories.
|
||||
@ -210,7 +177,6 @@ The `collections` setting is the heart of your Simple CMS configuration, as it d
|
||||
* `files` or `folder` (requires one of these): specifies the collection type and location; details in [Collection Types](../collection-types)
|
||||
* `filter`: optional filter for `folder` collections; details in [Collection Types](../collection-types)
|
||||
* `create`: for `folder` collections only; `true` allows users to create new items in the collection; defaults to `false`
|
||||
* `publish`: for `publish_mode: editorial_workflow` only; `false` hides UI publishing controls for a collection; defaults to `true`
|
||||
* `hide`: `true` hides a collection in the CMS UI; defaults to `false`. Useful when using the relation widget to hide referenced collections.
|
||||
* `delete`: `false` prevents users from deleting items in a collection; defaults to `true`
|
||||
* `extension`: see detailed description below
|
||||
@ -297,46 +263,6 @@ slug: "{{year}}-{{month}}-{{day}}_{{title}}_{{some_other_field}}"
|
||||
slug: "{{year}}-{{month}}-{{day}}_{{fields.slug}}"
|
||||
```
|
||||
|
||||
### `preview_path`
|
||||
|
||||
A string representing the path where content in this collection can be found on the live site. This allows deploy preview links to direct to lead to a specific piece of content rather than the site root of a deploy preview.
|
||||
|
||||
**Available template tags:**
|
||||
|
||||
Template tags are the same as those for [slug](#slug), with the following exceptions:
|
||||
|
||||
* `{{slug}}` is the entire slug for the current entry (not just the url-safe identifier, as is the case with [`slug` configuration](#slug))
|
||||
* The date based template tags, such as `{{year}}` and `{{month}}`, are pulled from a date field in your entry, and may require additional configuration - see [`preview_path_date_field`](#preview_path_date_field) for details. If a date template tag is used and no date can be found, `preview_path` will be ignored.
|
||||
* `{{dirname}}` The path to the file's parent directory, relative to the collection's `folder`.
|
||||
* `{{filename}}` The file name without the extension part.
|
||||
* `{{extension}}` The file extension.
|
||||
|
||||
**Examples:**
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: posts
|
||||
preview_path: "blog/{{year}}/{{month}}/{{slug}}"
|
||||
```
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: posts
|
||||
preview_path: "blog/{{year}}/{{month}}/{{filename}}.{{extension}}"
|
||||
```
|
||||
|
||||
### `preview_path_date_field`
|
||||
|
||||
The name of a date field for parsing date-based template tags from `preview_path`. If this field is not provided and `preview_path` contains date-based template tags (eg. `{{year}}`), Simple CMS will attempt to infer a usable date field by checking for common date field names, such as `date`. If you find that you need to specify a date field, you can use `preview_path_date_field` to tell Simple CMS which field to use for preview path template tags.
|
||||
|
||||
**Example:**
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: posts
|
||||
preview_path_date_field: "updated_on"
|
||||
```
|
||||
|
||||
### `fields`
|
||||
|
||||
The `fields` option maps editor UI widgets to field-value pairs in the saved file. The order of the fields in your Simple CMS `config.yml` file determines their order in the editor UI and in the saved file.
|
||||
@ -454,4 +380,4 @@ Defaults to an empty list.
|
||||
pattern: \d{4}
|
||||
- label: Drafts
|
||||
field: draft
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user