Reputation: 1
Using Decap CMS (formerly Netlify CMS) -- In the admin dashboard, how can I add a cover image/thumbnail to a collection item using the _data directory? On the demo site from their documentation:
https://demo.decapcms.org/#/collections/posts
When changing the view from 'list' to 'icon' and scrolling to the bottom, there are items in the collection that have a cover image/thumbnail. See screenshot for reference.
admin dashboard showing collection items with a configurable thumbnail image
In my config.yml I've tried multiple times and different ways similar to the pattern on their github repo/sample code:
https://github.com/decaporg/decap-cms/blob/main/dev-test/config.yml
But haven't had any success.
Thanks for your time.
Within the config.yml
I've tried adding two different code snippets based on the code sample (github repo) from Decap CMS's documentation
// config.yml
collections:
- name: "blog"
label: "Blog"
folder: "src/posts/blog"
create: true
editor:
preview: false
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Description", name: "description", widget: "text" }
- { label: "Author", name: "author", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Body", name: "body", widget: "markdown" }
- label: "Cover Image" # Only works for 'post' folder, NOT _data
name: "cover_image"
widget: "image"
required: false
- widget: select
label: "tags"
name: "tags"
multiple: true
create: true
options: ["popular", "general", "physical", "emotion", "finance"]
Upvotes: 0
Views: 48