You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can connect Decap CMS to a local Git repository, instead of working with a live repo.
15
-
16
-
1. Navigate to a local Git repository configured with the CMS.
17
-
2. Add the top-level property `local_backend` configuration to your `config.yml`:
18
-
19
-
```yaml
20
-
# when using the default proxy server port
21
-
local_backend: true
22
-
23
-
backend:
24
-
name: git-gateway
25
-
```
26
-
27
-
3. Run `npx decap-server` from the root directory of the above repository.
28
-
29
-
* If the default port (8081) is in use, the proxy server won't start and you will see an error message. In this case, follow [these steps](#configure-the-decap-server-port-number) before proceeding.
30
-
4. Start your local development server (e.g. run `gatsby develop`).
31
-
5. Open `http://localhost:<port>/admin` to verify that your can administer your content locally. Replace `<port>` with the port of your local development server. For example Gatsby's default port is `8000`
32
-
33
-
**Note:** `decap-server` runs an unauthenticated express server. As any client can send requests to the server, it should only be used for local development. Also note that `editorial_workflow` is not supported in this environment.
34
-
35
-
### Configure the Decap CMS proxy server port number
36
-
37
-
1. Create a `.env` file in the project's root folder and define the PORT you'd like the proxy server to use
38
-
39
-
```ini
40
-
PORT=8082
41
-
```
42
-
43
-
2. Update the `local_backend` object in `config.yml` and specify a `url` property to use your custom port number
44
-
45
-
```yaml
46
-
backend:
47
-
name: git-gateway
48
-
49
-
local_backend:
50
-
# when using a custom proxy server port
51
-
url: http://localhost:8082/api/v1
52
-
# when accessing the local site from a host other than 'localhost' or '127.0.0.1'
53
-
allowed_hosts: ['192.168.0.1']
54
-
```
55
10
56
11
## GitLab and BitBucket Editorial Workflow Support
You can connect Decap CMS to a local Git repository, instead of working with a live repo.
7
+
8
+
1. Navigate to a local Git repository configured with the CMS.
9
+
2. Add the top-level property `local_backend` configuration to your `config.yml`:
10
+
11
+
```yaml
12
+
# when using the default proxy server port
13
+
local_backend: true
14
+
15
+
backend:
16
+
name: git-gateway
17
+
```
18
+
19
+
3. Run `npx decap-server` from the root directory of the above repository.
20
+
21
+
* If the default port (8081) is in use, the proxy server won't start and you will see an error message. In this case, follow [these steps](#configure-the-decap-server-port-number) before proceeding.
22
+
4. Start your local development server (e.g. run `gatsby develop`).
23
+
5. Open `http://localhost:<port>/admin` to verify that your can administer your content locally. Replace `<port>` with the port of your local development server. For example Gatsby's default port is `8000`
24
+
25
+
**Note:** `decap-server` runs an unauthenticated express server. As any client can send requests to the server, it should only be used for local development. Also note that `editorial_workflow` is not supported in this environment.
26
+
27
+
### Configure the Decap CMS proxy server port number
28
+
29
+
1. Create a `.env` file in the project's root folder and define the PORT you'd like the proxy server to use
30
+
31
+
```ini
32
+
PORT=8082
33
+
```
34
+
35
+
2. Update the `local_backend` object in `config.yml` and specify a `url` property to use your custom port number
36
+
37
+
```yaml
38
+
backend:
39
+
name: git-gateway
40
+
41
+
local_backend:
42
+
# when using a custom proxy server port
43
+
url: http://localhost:8082/api/v1
44
+
# when accessing the local site from a host other than 'localhost' or '127.0.0.1'
0 commit comments