Jekyll config.yml在解析块映射时未找到预期的密钥 [英] Jekyll config.yml did not find expected key while parsing a block mapping
本文介绍了Jekyll config.yml在解析块映射时未找到预期的密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在命令行终端出现此错误:
I'm getting this error in the command line terminal:
解析第18行第7列的块映射时未找到预期的密钥
did not find expected key while parsing a block mapping at line 18 column 7
我的jekyll _config.yml YAML文件看起来像这样:
My jekyll _config.yml YAML file looks like this:
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设置格式/缩进.
I'm not sure of your formating/indentation for _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"
这篇关于Jekyll config.yml在解析块映射时未找到预期的密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文