Hugo CMS project
My Hugo CMS content folder organized like this:
/content/worldnews/
/content/nationalnews/
/content/statenews/
Now, I need a decap cms collctions config which have an option for folder dropdown to choose the news type. Like world, national, state.
If I select "world" the post must saved to /content/worldnews/
If I select "national" the post must saved to /content/nationalnews/
If I select "state" the post must saved to /content/statenews/
I tried this but not successful as it saves it to root folder "content"
- name: blog
label: Blog Posts
folder: { fields.folder }
create: true
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "content", widget: "markdown" }
- { label: "Date", name: "date", widget: "datetime" }
- { label: "Folder", name: "folder", widget: "select", options: ["world", "national", "state"] }