Jekyll config.yml在解析块映射时未找到预期的密钥

奥利·W

我在命令行终端收到此错误:

在第18行第7列解析块映射时未找到预期的密钥

我的jekyll _config.yml YAML文件如下所示:

title: Oliver Williams - Portfolio
url: "http://yourdomain.com" # the base hostname & protocol for your site

# Build settings
markdown: kramdown
permalink: /:title

defaults:
  -
    scope:
      path: "" # an empty string here means all files in the project
      type: "posts" # previously `post` in Jekyll 2.2.
    values:
      layout: "post"

       -
    scope:
      path: "" # an empty string here means all files in the project
      type: "pages" 
    values:
      layout: "page"
大卫·雅克

我不确定您的_config.yml格式/缩进形式。

这是正确的:

title: Oliver Williams - Portfolio
url: "http://yourdomain.com"
markdown: kramdown 
permalink: /:title

defaults: 
  - 
    scope: 
      path: "" 
      type: "posts" 
    values: 
      layout: "post"
  -
    scope:
      path: ""
      type: "pages" 
    values:
      layout: "page"

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章