Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docs: migrate Beta Features - Editorial Workflow #7044

Merged
11 changes: 0 additions & 11 deletions website/content/docs/add-to-your-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ backend:

The configuration above specifies your backend protocol and your publication branch. Git Gateway is an open source API that acts as a proxy between authenticated users of your site and your site repo. (We'll get to the details of that in the [Authentication section](#authentication) below.) If you leave out the `branch` declaration, it defaults to `master`.

### Editorial Workflow

**Note:** Editorial workflow works with GitHub repositories. Support for GitLab and Bitbucket is [in beta](/docs/beta-features/#gitlab-and-bitbucket-editorial-workflow-support).

By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in `backend`. However, you also have the option to enable the [Editorial Workflow](../configuration-options/#publish-mode), which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Decap CMS `config.yml`:

```yaml
# This line should *not* be indented
publish_mode: editorial_workflow
```

### Media and Public Folders

Decap CMS allows users to upload images directly within the editor. For this to work, the CMS needs to know where to save them. If you already have an `images` folder in your project, you could use its path, possibly creating an `uploads` sub-folder, for example:
Expand Down
23 changes: 0 additions & 23 deletions website/content/docs/beta-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ We run new functionality in an open beta format from time to time. That means th
**Use these features at your own risk.**


## GitLab and BitBucket Editorial Workflow Support

***added in `netlify-cms@2.10.6` / `netlify-cms-app@2.11.3`***

You can enable the Editorial Workflow with the following line in your Decap CMS `config.yml` file:

```yaml
publish_mode: editorial_workflow
```

In order to track unpublished entries statuses the GitLab implementation uses merge requests labels and the BitBucket implementation uses pull requests comments.



Expand Down Expand Up @@ -112,18 +101,6 @@ You can now provide your own element for Decap CMS to mount in by setting the ta



## Squash merge GitHub pull requests

When using the [Editorial Workflow](../configuration-options/#publish-mode) with the `github` or GitHub-connected `git-gateway` backends, Decap CMS creates a pull request for each unpublished entry. Every time the unpublished entry is changed and saved, a new commit is added to the pull request. When the entry is published, the pull request is merged, and all of those commits are added to your project commit history in a merge commit.

The squash merge option causes all commits to be "squashed" into a single commit when the pull request is merged, and the resulting commit is rebased onto the target branch, avoiding the merge commit altogether.

To enable this feature, you can set the following option in your Decap CMS `config.yml`:

```yaml
backend:
squash_merges: true
```


## Image widget file size limit
Expand Down
15 changes: 1 addition & 14 deletions website/content/docs/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,13 @@ Template tags produce the following output:

## Publish Mode

By default, all entries created or edited in the Decap 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 Decap CMS `config.yml` file:
By default, all entries created or edited in the Decap CMS are committed directly into the main repository branch. The `publish_mode` option allows you to enable [Editorial Workflow](/docs/editorial-workflows/) mode for more control over the content publishing phases. You can enable the Editorial Workflow with the following line in your Decap 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 Netlify 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

Expand Down
48 changes: 48 additions & 0 deletions website/content/docs/editorial-workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
group: Workflow
weight: 20
title: Editorial Workflows
---


By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in `backend`. However, you also have the option to edit the [Publish Mode](../configuration-options/#publish-mode), which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Decap CMS `config.yml`:

```yaml
# This line should *not* be indented
publish_mode: editorial_workflow
```

From a technical perspective, the workflow translates editor UI actions into common Git commands:

| Actions in Netlify 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 |

**Note:** Editorial workflow works with GitHub repositories, and support for [GitLab](/docs/gitlab-backend/) and [Bitbucket](/docs/bitbucket-backend/).


### Bitbucket Support

In order to track unpublished entries statuses the Bitbucket implementation uses
[pull requests comments](https://confluence.atlassian.com/bitbucketserver/commenting-on-a-pull-request-1027119882.html).

### GitLab Support

In order to track unpublished entries statuses the GitLab implementation uses
[merge requests labels](https://docs.gitlab.com/ee/user/project/labels.html).


## Squash merge GitHub pull requests

When using the **Editorial Workflow** with the `github` or GitHub-connected `git-gateway` backends, Decap CMS creates a pull request for each unpublished entry. Every time the unpublished entry is changed and saved, a new commit is added to the pull request. When the entry is published, the pull request is merged, and all of those commits are added to your project commit history in a merge commit.

The squash merge option causes all commits to be "squashed" into a single commit when the pull request is merged, and the resulting commit is rebased onto the target branch, avoiding the merge commit altogether.

To enable this feature, you can set the following option in your Decap CMS `config.yml`:

```yaml
backend:
squash_merges: true
```