将Netlify CMS与我的Pelican静态网站集成时出现问题(错误:无法加载config.yml)

时间:2019-12-07 10:19:19

标签: pelican netlify-cms

我正在尝试将Netlify CMS集成到静态的Pelican网站。 出现以下错误时,我似乎无法访问/ admin:

    public static Color doubleToColor(double x,double maxx){
        float cR=(float)(0.5 + (x / (2 * maxx)));
        float cG=(float)(0.5 + (x / (2 * maxx)));
        float cB=(float)(0.5 - (x / (2 * maxx)));
        Color c = new Color(cR,cG,cB);
        return c;
    }

这是admin / index.html的内容(我跟随these instructions

Error: Failed to load config.yml
Check your config.yml file.

这是我的config.yaml的内容

<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Content Manager</title>
  <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
  <!-- Include the script that builds the page and powers Netlify CMS -->
  <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>

如果需要,该网站的网址为https://distracted-engelbart-20e42f.netlify.com

对我在这里做错的任何想法吗?

1 个答案:

答案 0 :(得分:1)

这篇文章已有几个月的历史了,所以我想你能正常工作吗?

我必须将管理文件添加到STATIC_PATHS中的pelicanconf.py变量中

STATIC_PATHS = [
    'admin/index.html',
    'admin/config.yml',
    'images',
    'extra'
]

这是我集成了https://github.com/marcus-clements/pelican-netlify-cms的Netlify CMS的示例存储库