ahuigo
ahuigo

Reputation: 3331

How to stop github pages from parsing YAML

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?

Upvotes: 1

Views: 354

Answers (2)

utdrmac
utdrmac

Reputation: 781

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.

Upvotes: 2

ahuigo
ahuigo

Reputation: 3331

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

touch .nojekyll
git add .
git push

Upvotes: 2

Related Questions