How to stop github pages from parsing YAML

陌路散爱 提交于 2020-01-05 04:30:13

问题


I've write a pure static blog without jekyll engine, it is pure js static blog.

I want to push my js blog to github pages, unfortunately it will parse YAML and get such an error:

Your site is having problems building: There was a YAML syntax error on line 3 column 14 in : mapping values are not allowed in this context. For more information, see https://help.github.com/articles/page-build-failed-invalid-yaml-in-data-file.

How to stop github pages from parsing YAML?


回答1:


I found a solution by trial-and-error. If you put a YML comment as the first few lines, Jekyll will not process it.

# 
# Comment
# 

---
- hosts: all

In my case, I was trying to serve static .yml ansible playbooks and Jekyll kept parsing "{{ item.name }}" into "" when the files were downloaded.




回答2:


If you want to disable jekyll, add an empty file .nojekyll at the root of github page repo.

touch .nojekyll
git add .
git push


来源:https://stackoverflow.com/questions/39404020/how-to-stop-github-pages-from-parsing-yaml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!