我正在使用NetlifyCMS,我想创建相同的集合(作者),但是每个条目都位于不同的文件夹中。 例如我希望在/content/author/john/_index.md
中创建条目John这是我的作者收藏:
collections:
- name: "author"
label: "Author"
folder: "content/author/XXXXXXXXXXXXXXXXXX"
create: true
slug: "_index.md"
fields:
- {label: "Url Path (no space)", name: "title", widget: "string"}
- {label: "Full Name", name: "name", widget: "string"}
- {label: "Email", name: "email", widget: "string"}
- {label: "Github", name: "github", widget: "string", required: false}
- {label: "Photo", name: "photo", widget: "image", required: false}
- {label: "Description", name: "body", widget: "markdown"}
我尝试使用:
folder: "content/author/{{slug}}"
和slug: "/_index"
在content/author/{{slug}}/_index.md
中创建了文件folder: "content/author"
和slug: "{{slug}}/_index"
在content/author/john-_index.md
中创建了文件但是这些都不起作用。