2016-08-12 47 views
1

有很多帖子描述這個相同的錯誤,我試圖讀取它們全部找出究竟是什麼導致我的錯誤。「有一個YAML語法錯誤」...「在此上下文中不允許映射值」

我試過用這種文件十一種不同的方法來修復這個文件,甚至把它恢復到原來的文件 - 仍然沒有運氣。我錯過了什麼?

錯誤被認爲是在「第3行第22列」 - 這是不存在的。我在客戶端沒有jekyll解析器,一切都通過GitHub頁面處理。

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: [email protected] 
    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 
+0

必須有一些對文件進行加擾的預處理。它在語法上是正確的YAML。 – Anthon

+0

@Anthon任何想法,我可以嘗試找出預處理問題的可能性是什麼樣的調試工作?我通過GitHub網絡用戶界面完成整個過程。 – drovani

回答

1

相反,問題在_config.yml文件是的,它是在一個完全不同的文件完全。因此,如果您從構建github頁面Jekyll頁面中收到此錯誤消息,請不要認爲它是唯一的「YAML」文件。搜索您爲第3行第22列添加的任何新文件,並追蹤該錯誤。

在我的情況下,這是一個在前面的帖子的標題有一個冒號後面有一個空格 - 我需要把雙引號括起來。

相關問題