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

Enable index files editing in same folder as single pages #7381

Open
martinjagodic opened this issue Jan 28, 2025 · 0 comments
Open

Enable index files editing in same folder as single pages #7381

martinjagodic opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@martinjagodic
Copy link
Member

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:

- 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},
  ]
@martinjagodic martinjagodic added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 28, 2025
@demshy demshy mentioned this issue Jan 29, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

2 participants