Joj*_*oji 7 reactjs gatsby netlify netlify-cms
我正在尝试将 Gatsby starter 与 Netlify CMS 一起使用。https://github.com/stackrole-dev/gatsby-starter-foundation
\n\n我完全按照说明进行操作,但在启用 Git Gateway 后,当我尝试以管理员身份登录时,我遇到了此错误消息。
\n\nYour Git Gateway backend is not returning valid settings. Please make sure it is enabled.\nRun Code Online (Sandbox Code Playgroud)\n\n我不知道为什么它不起作用。
\n\n我的config.yml是
backend:\n name: git-gateway\n commit_messages:\n create: \'Create {{collection}} \xe2\x80\x9c{{slug}}\xe2\x80\x9d\'\n update: \'Update {{collection}} \xe2\x80\x9c{{slug}}\xe2\x80\x9d\'\n delete: \'Delete {{collection}} \xe2\x80\x9c{{slug}}\xe2\x80\x9d\'\n uploadMedia: \'[skip ci] Upload \xe2\x80\x9c{{path}}\xe2\x80\x9d\'\n deleteMedia: \'[skip ci] Delete \xe2\x80\x9c{{path}}\xe2\x80\x9d\'\n\nlocal_backend: true # run npx netlify-cms-proxy-server for local testing\n\nmedia_folder: "static/assets" \npublic_folder: "/assets" \n\ncollections:\nRun Code Online (Sandbox Code Playgroud)\n
您需要git-gateway在 Netlify 中启用外部提供商的设置,如Netlify 文档中所示:
此配置可以在https://app.netlify.com/sites/YOURNAME/settings/identity下找到
另外,你config.yml还缺乏:
backend:
name: git-gateway
repo: username/repository
branch: master
Run Code Online (Sandbox Code Playgroud)
注意:将username和更改repository为您的姓名。
| 归档时间: |
|
| 查看次数: |
7022 次 |
| 最近记录: |