嗨,我是Netlify CMS的新手,我刚刚从博客中学到了
所以我有config.yml在Netlify CMS中创建两个输入字段 样本:
collections:
- name: 'team'
label: 'Team'
folder: 'src/team'
create: true
slug: '{{slug}}'
fields:
- { label: 'Team Member', name: 'title', widget: 'string' }
- { label: 'Bio', name: 'bio', widget: 'markdown' }
我只是想知道如何为图像添加输入字段
谢谢!
答案 0 :(得分:0)
只需添加
{ label: "Image", name: "thumbnail", widget: "image"}
进入您的一个字段
collections:
- name: 'team'
label: 'Team'
folder: 'src/team'
create: true
slug: '{{slug}}'
fields:
- { label: 'Team Member', name: 'title', widget: 'string' }
- { label: 'Bio', name: 'bio', widget: 'markdown' }
- { label: "Image", name: "thumbnail", widget: "image"}