有一个YAML语法错误... "此处不允许映射值"

4
有很多帖子都描述了这个错误,我尝试阅读了所有内容,想找出到底是什么原因导致了我的错误。
我尝试了11种不同的方式来修改这个文件,甚至把它恢复成原始文件,但仍然没有成功。我错过了什么吗?
这个错误据说在“第3行第22列”——但这个位置根本不存在。我没有jekyll解析器在客户端,一切都由GitHub Pages处理。 https://github.com/drovani/drovani.github.io/commits/master/_config.yml
#
# This file contains configuration flags to customize your site
#

# Name of your site (displayed in the header)
name: "Rovani in C#"

# Short bio or description (displayed in the header)
description: "Ostinato, Pensato, Scordatura"

# URL of your avatar or profile pic (you could use your GitHub profile pic)
avatar: https://avatars3.githubusercontent.com/u/898478

#
# Flags below are optional
#

# Includes an icon in the footer for each username you enter
footer-links:
  dribbble:
  email: dev@rovani.net
  facebook:
  flickr:
  github: drovani
  instagram:
  linkedin:
  pinterest:
  rss: # just type anything here for a working RSS icon
  twitter: davidrovani
  stackoverflow: "users/28310/drovani"
  youtube: # channel/<your_long_string> or user/<user-name>
  googleplus: # anything in your profile username that comes after plus.google.com/


# Enter your Disqus shortname (not your username) to enable commenting on posts
# You can find your shortname on the Settings page of your Disqus account
disqus: drovani

# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking
google_analytics: UA-82341148-1

# Your website URL (e.g. http://barryclark.github.io or http://www.barryclark.co)
# Used for Sitemap.xml and your RSS feed
url:

# If you're hosting your site at a Project repository on GitHub pages
# (http://yourusername.github.io/repository-name)
# and NOT your User repository (http://yourusername.github.io)
# then add in the baseurl here, like this: "/repository-name"
baseurl: ""

#
# !! You don't need to change any of the configuration flags below !!
#

permalink: /:title/

# The release of Jekyll Now that you're using
version: v1.2.0

# Jekyll 3 now only supports Kramdown for Markdown
kramdown:
  # Use GitHub flavored markdown, including triple backtick fenced code blocks
  input: GFM
  # Jekyll 3 and GitHub Pages now only support rouge for syntax highlighting
  syntax_highlighter: rouge
  syntax_highlighter_opts:
    # Use existing pygments syntax highlighting css
    css_class: 'highlight'

# Set the Sass partials directory, as we're using @imports
sass:
  style: :expanded # You might prefer to minify using :compressed

# Use the following plug-ins
gems:
  - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem
  - jekyll-feed # Create an Atom feed using the official Jekyll feed gem

# Exclude these files from your production _site
exclude:
  - Gemfile
  - Gemfile.lock
  - LICENSE
  - README.md
  - CNAME

必须进行一些预处理来混淆文件。它是语法正确的 YAML。 - Anthon
@Anthon 你有什么想法可以尝试调试来找出预处理问题可能出在哪里吗?我是通过GitHub网页界面完成整个过程的。 - drovani
1个回答

4

与_config.yml文件不同,问题实际上出现在一个完全不同的文件中。因此,如果您从构建github-pages Jekyll页面中收到此错误消息,请不要假设它只存在于“YAML”文件中。搜索您添加的任何新文件,查找第3行第22列,就能追踪到错误。

在我的情况下,问题是在正文中的标题中有一个冒号和一个空格-我需要在其周围加上双引号。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接