小编Fer*_*aya的帖子

YAMLSyntaxError:所有集合项必须从 X 行 X 列的同一列开始

我在尝试运行 netlify CMS 时收到此错误。

\n
Error loading the CMS configuration\nConfig Errors:\nYAMLSyntaxError: All collection items must start at the same column at line 71, column 5:\n\n  - name: 'data'\n    ^^^^^^^^^^^^\xe2\x80\xa6\nCheck your config.yml file.\n
Run Code Online (Sandbox Code Playgroud)\n

这是我的 config.yml 文件。其他一切都工作正常,但是当尝试访问管理员时,我抛出了该错误。我检查了身份,一切对我来说似乎都很好。检查了第 51 行,但找不到语法错误是什么。

\n
---\n---\n\ncollections:\n\n  - name: 'blog'\n    label: 'Posts'\n    folder: '_posts'\n    create: true\n    slug: '{{"{{year"}}}}-{{"{{month"}}}}-{{"{{day"}}}}-{{"{{slug"}}}}'\n    fields:\n      - { label: 'Layout', name: 'layout', widget: 'hidden', default: 'post' }\n      - { label: 'Title', name: 'title', widget: 'string' }\n      - { label: 'Date', name: 'date', widget: 'date', …
Run Code Online (Sandbox Code Playgroud)

syntax yaml config indentation jekyll

15
推荐指数
1
解决办法
4万
查看次数

标签 统计

config ×1

indentation ×1

jekyll ×1

syntax ×1

yaml ×1