Enable index files editing in same folder as single pages
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
Currently, we have to create 2 collections if we want to enable the editing of index and single pages in a folder. We also have to use a filter to differentiate them, as Decap is unaware of the difference. This is a suggestion to join those and allow for a new config of
Add a config option `index_files` that acts the same as `files` in a folder collection.
We could use the `meta.index_file` (now used for nested collections) option to get which files are `index`. It is worth investigating if a separate option should be used.
Example:
```yaml
- name: news
label: News
label_singular: article
folder: content/news
meta: {path: {widget: string, label: 'Path', index_file: '_index'}}
fields: [
{name: title, widget: string},
{name: date, widget: datetime},
{name: body, widget: markdown},
]
index_fields: [
{name: title, widget: string},
]
```
Contributor guide
Assessment
This issue has not been assessed yet.