【发布时间】:2021-07-01 17:34:01
【问题描述】:
我正在制作一个 Vuepress 博客,我会在后端添加到 Netlify CMS。
在 Vuepress 中实现 Netlify CMS 的步骤:
-
创建这个路径 /blog/.vuepress/public/admin
-
使用以下代码在路径中创建一个 index.html:
-
在同一路径中创建 config.yml:
后端:
名称:github
分支:主
回购:github用户名/回购名
发布模式:编辑工作流
媒体文件夹:“.vuepress/public/assets/img”
公共文件夹:“img”
收藏:- name: "blog" # 在路由中使用,例如 /admin/collections/blog
label: "Blog" # 在 UI 中使用
文件夹:“博客/_posts”
- name: "blog" # 在路由中使用,例如 /admin/collections/blog
Here官方文档。
消息也是一样的:
Error loading the CMS configuration<br>
Config Errors:<br>
config must have required property 'media_folder'<br>
config must have required property 'media_library'<br>
config must match a schema in anyOf<br>
config must have required property 'collections'<br>
Check your config.yml file.<br>
我不确定是什么问题,因为该文件存在于 /admin 中并且定义了 media_folder 参数。
我已阅读 Netlify CMS 文档和教程,并已通过 Netlify 连接器链接了 Github。
你能帮帮我吗?
谢谢!
【问题讨论】:
标签: netlify-cms vuepress