yaml格式文件,解析错误。


网上找了yaml的格式转换器,基本上不可用,自己调又失败,不知道错在哪儿,恳请各位帮忙看看:


 markdown: kramdown
pygments: true
safe: false
permalink: /posts/:title.html
exclude:
    - README.md

name: ######
host: http://#######/
desc: 长路漫漫 无心停留

custom: 
    category: 
        program: 编程之旅
        golang: golang
        shell: shell脚本
        funny: 折腾
    categories: 
        - name: program
        title: 编程之旅
        - name: golang
        title: golang
        - name: shell
        title: shell脚本
        - name: funny 
        title: 折腾


meta:
    author: 
        name: Afred
        email: 3######@gmail.com
        disqus: your-disqus-short-name              # Disqus缩略标识
        gcse: 018154889538965992626:ibsyratvihw     # Google自定义搜索标识ID
        github: https://########                 # GitHub账号
        gravatar: 7dfb3c6fe5d0c1f5121d7d6d311fa8ff  # Gravatar头像标识

    disqus: disqus.com/embed.js                     # Disqus评论的JS地址
    gapi: http://www.google.com/jsapi               # Google API地址
    gravatar: http://en.gravatar.com/avatar/        # Gravatar头像服务器地址

就这种格式,本地调试jekyll,直接报错: 部署好像成功了,但是报错,导致博客无法正常显示

昨天搞了一晚上也没看出来问题在哪儿,用vim和notepad++都调了。

EDIT: 有没有本地格式化yaml的编辑器? 编码格式也设置了,但是上面还是有git中文乱码的问题?

DONE 问题解决了,多谢各位热心帮助,将依云给出的url放在这儿: http://www.yaml.org/spec/1.2/spec.html#id2761803

github yaml jekyll

高坂·桐乃 10 years, 10 months ago

提示出错的地方(以及后边几处)的缩进不对,没和上边的 key 对齐。

肛门♂幽灵 answered 10 years, 10 months ago

Your Answer