Search code examples
htmlgithubyamljekyll

jekyll yaml front-matter is turned into <hr> tag by markdown


My jekyll YAML header infomation can't be rightly parse by github page server.

My blog markdown file under _posts is named 2014-08-28-just-build-my-blog-site.md, and it's like:

---
layout: post
title: just build my blog site
---
Hello World

The markdown file can be rightly turned into html in my local jekyll server. But when I upload my post to Github. Github turn the "---" in md file into

<hr> 

html tag.

Why the jekyll of my local computer can rightly parse my markdown file, but the jekyll that parsed by github page can't. What can I do? Thank you.


Solution

  • Your text editor is saving files in an 'unknown' encoding. Maybe chinese. Try to encode as utf-8 it's a standard for Jekyll