我正在尝试将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
对我在这里做错的任何想法吗?
答案 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的示例存储库