feat(docs-nested-collections): add expected structure (#4969)

This commit is contained in:
Martin Jagodic 2021-02-18 13:25:44 +01:00 committed by GitHub
parent 4d296ed77e
commit 7129253e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,13 +22,13 @@ backend:
# when using the default proxy server port # when using the default proxy server port
local_backend: true local_backend: true
``` ```
3. Run `npx netlify-cms-proxy-server` from the root directory of the above repository. 3. Run `npx netlify-cms-proxy-server` from the root directory of the above repository.
- 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-netlify-cms-proxy-server-port-number) before proceeding.
* 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-netlify-cms-proxy-server-port-number) before proceeding.
4. Start your local development server (e.g. run `gatsby develop`). 4. Start your local development server (e.g. run `gatsby develop`).
5. Open [http://localhost:8000/admin](http://localhost:8000/admin) to verify that your can administer your content locally. 5. Open <http://localhost:8000/admin> to verify that your can administer your content locally.
**Note:** `netlify-cms-proxy-server` runs an unauthenticated express server. As any client can send requests to the server, it should only be used for local development. **Note:** `netlify-cms-proxy-server` runs an unauthenticated express server. As any client can send requests to the server, it should only be used for local development.
@ -51,10 +51,8 @@ local_backend:
url: http://localhost:8082/api/v1 url: http://localhost:8082/api/v1
# when accessing the local site from a host other than 'localhost' or '127.0.0.1' # when accessing the local site from a host other than 'localhost' or '127.0.0.1'
allowed_hosts: ['192.168.0.1'] allowed_hosts: ['192.168.0.1']
``` ```
## GitLab and BitBucket Editorial Workflow Support ## GitLab and BitBucket Editorial Workflow Support
***added in netlify-cms@2.10.6 / netlify-cms-app@2.11.3*** ***added in netlify-cms@2.10.6 / netlify-cms-app@2.11.3***
@ -614,3 +612,18 @@ collections:
# moving an existing entry will move the entire sub tree of the entry to the new location # moving an existing entry will move the entire sub tree of the entry to the new location
meta: { path: { widget: string, label: 'Path', index_file: 'index' } } meta: { path: { widget: string, label: 'Path', index_file: 'index' } }
``` ```
Nested collections expect the following directory structure:
```
content
└── pages
├── authors
│ ├── author-1
│ │ └── index.md
│ └── index.md
├── index.md
└── posts
├── hello-world
│ └── index.md
└── index.md
```