Jekyll markdown utf-8

I worked on jekyll on my personal website and on my blogs, I ran into the problem of UTF-8 encoding.

It works fine on my local machine, but it doesn't work well in production. https://github.com/freedomgw/thehacklife/blob/gh-pages/_posts/2013-12-14-the-power-of-ajax.md

This is what really looks like living things. http://thehacklife.com/posts/the-power-of-ajax/

I'm just not quite sure how to fix this on github pages ... since github are the ones that host the site. In addition, I use an elevated value, and I save it in UTF-8 encoding in markdown format.

Any suggestions are welcome.

+8
github-pages jekyll r-markdown
source share
2 answers

I had the same problem. My apostrophes appeared as ". The solution is to explicitly declare the encoding using <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

+14
source share

I had the same problem with new messages (however, auto-converted old ones worked fine). The resolution was to add

 layout: post 

inside the post.markdown file; Example:

 --- title: 'My title' layout: post --- page content 

This will automatically add the UTF-8 encoding header mentioned in another answer / comment.

0
source share

All Articles