jekyll markdown UTF-8

Viewed 4997

i have been working on jekyll on my personal website and for my blogs, i have come across a problem with UTF-8 encoding.

It works perfectly 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 it actually looks like on live.. http://thehacklife.com/posts/the-power-of-ajax/

I am just not entirely sure how to fix this on github pages... since github are the ones hosting the site. Also, I am using sublime and I am saving it in UTF-8 encoding in markdown format.

Any suggestions are appreciated

2 Answers

I had the same issue with new posts (auto-converted old ones worked fine, though). 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 charset header mentioned in the other answer / comment.

Related