允许在 NetlifyCMS 中选择多个图像
Allow the selection of multiple images in NetlifyCMS
我目前正在将 NetlifyCMS 集成到我的 Gatsby 项目中,但我无法允许 select 多张图片。我没有指定任何媒体库,因为我只想将这些图像直接存储在我的存储库中。我正在使用 gatsby-plugin-netlify-cms
并将此配置用于我的 collection
- name: "post"
label: "Posts"
label_singular: "Post"
folder: "example/data/posts"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
editor:
preview: false
fields:
- { label: "Title", name: "title", widget: "string" }
- label: "Media"
name: "media"
widget: "image"
allow_multiple: true
media_library:
config:
multiple: true
- { label: "Location", name: "location", type: "Point", widget: "map", required: false }
- { label: "Body", name: "body", widget: "text", required: false }
尽管我指定了 allow_multiple
和 media_library.config.multiple
,但我无法在 NetlifyCMS 管理 GUI 中 select 多张图片。
我安装了那些软件包
netlify-cms@^2.10.17
netlify-cms-app@^2.11.14
netlify-cms-widget-image@^2.5.0
gatsby-plugin-netlify-cms@^4.1.39
我错过了什么吗?在文档中没有找到任何相关内容。
干杯
原来你需要添加第三方媒体库来支持这个。
我目前正在将 NetlifyCMS 集成到我的 Gatsby 项目中,但我无法允许 select 多张图片。我没有指定任何媒体库,因为我只想将这些图像直接存储在我的存储库中。我正在使用 gatsby-plugin-netlify-cms
并将此配置用于我的 collection
- name: "post"
label: "Posts"
label_singular: "Post"
folder: "example/data/posts"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
editor:
preview: false
fields:
- { label: "Title", name: "title", widget: "string" }
- label: "Media"
name: "media"
widget: "image"
allow_multiple: true
media_library:
config:
multiple: true
- { label: "Location", name: "location", type: "Point", widget: "map", required: false }
- { label: "Body", name: "body", widget: "text", required: false }
尽管我指定了 allow_multiple
和 media_library.config.multiple
,但我无法在 NetlifyCMS 管理 GUI 中 select 多张图片。
我安装了那些软件包
netlify-cms@^2.10.17
netlify-cms-app@^2.11.14
netlify-cms-widget-image@^2.5.0
gatsby-plugin-netlify-cms@^4.1.39
我错过了什么吗?在文档中没有找到任何相关内容。
干杯
原来你需要添加第三方媒体库来支持这个。