Scenario:
I have a variable within the front matter of every blog post which looks like the following:
---
icon: ☕
---
When I display a list of blog posts I reference this UTF-8 character
{% for post in site.posts %}
<span class="icon">{{ post.icon }}</span>
{% endfor %}
I build the site locally, check localhost:4000 to make sure everything is fine, and then push to GitHub. My site is hosted by GitHub Pages and GitHub will build the site every time I push to master.
Problem:
The site looks fine when I build it locally. I can see the UTF-8 character displayed and when I check the source of the page it shows a span tag with the UTF-8 character.
<span class="icon">☕</span>
However, the UTF-8 character is not visible on the website built by GitHub and the UTF-8 character is not within the span tag
<span class="icon"></span>
I have double checked and made sure that I have pushed everything to origin. Why is my UTF-8 character missing?
EDIT: I have solved my problem but I still do not know why it was happening. I think knowing why GitHub is failing to properly parse the front-matter is worth knowing and I will keep this question open until someone is able to find out