Yaml Jekyll config.yml错误:未找到预期的'-';分析块集合时的指示符
命令行显示config.yml文件中的以下错误:Yaml Jekyll config.yml错误:未找到预期的'-';分析块集合时的指示符,yaml,syntax-error,jekyll,Yaml,Syntax Error,Jekyll,命令行显示config.yml文件中的以下错误: did not find expected '-' indicator while parsing a block collection at line 101 column 3 (Psych::SyntaxError) 我试图取消所有内容的缩进,并用空格再次缩进,但问题仍然存在。 这是我的密码: name: "SITENAME | Official Website" description: "SOME DESCRIPTION" # url:
did not find expected '-' indicator while parsing a block collection at line 101 column 3 (Psych::SyntaxError)
我试图取消所有内容的缩进,并用空格再次缩进,但问题仍然存在。
这是我的密码:
name: "SITENAME | Official Website"
description: "SOME DESCRIPTION"
# url: SOME URL
sass:
sass_dir: _sass
style: compressed
author:
name: "AUTHOR'S NAME"
social-network-links:
rss: true
facebook: "FB"
twitter: "TW"
linkedin: "LI"
# Select which share links to show in posts
share-links-active:
twitter: true
facebook: true
linkedin: true
# Facebook App ID (for Ads)
# fb_app_id: ""
# Excerpt Word Length
# Truncates the excerpt to the specified number of words on the index page
excerpt_length: 40
# Ruby Date Format
date_format: "%B %-d, %Y"
# --- Comments --- #
# Disqus shortname (NOT userid)
comments:
provider: "disqus"
disqus:
shortname: "SHORTNAME"
# --- Web Statistics Section --- #
google_analytics: "GA"
# Google Tag Manager ID
gtm: "GTM"
# Output options (more information on Jekyll's site)
timezone: "Europe/Berlin"
markdown: kramdown
highlighter: rouge
permalink: /:year-:month-:day-:title/
paginate: 5
kramdown:
input: GFM
# Default YAML values
defaults:
-
scope:
path: ""
type: "posts"
values:
layout: "post"
comments: true # add comments to all blog posts
social-share: true # add social media sharing buttons to all blog posts
-
scope:
path: "" # all files
values:
layout: "page"
comments: false
# Use tags index page and make tags on each post clickable
link-tags: true
# Exclude these files from production site
exclude:
- CHANGELOG.md
- CNAME
- Gemfile
- Gemfile.lock
- LICENSE
- README.md
- .jekyll-cache
plugins:
- jekyll-feed ******THIS IS THE LINE 101*********
- jekyll-archives
- jekyll-sitemap
我读了很多关于这个问题的文章,但我想不出来。我必须说这是我的第一个config.yml文件,我可能遗漏了一些简单的东西。
提前感谢您高度赞赏的帮助 我在线检查了一些yaml linter上的代码,每一处都显示“Valid yaml”。如果标记的行是第101行,那么就没有显示完整的代码。您的代码只有100行。正如您所展示的,您的文件确实是有效的YAML。是的,我刚刚删除了一些注释。没什么特别的。如果代码有效,可能会出现什么问题?我还删除了Gemfile.lock并重新运行bundle更新。这件事让我很头疼。你绝对确定这个错误发生在这个YAML文件中,而不可能发生在另一个包含在某处的文件中吗?我确实在_data文件夹中有几个YAML文件,但它们从来都不是问题。我只是在更新config.file后才发现错误。