1
votes

Jekyll is not parsing a post correctly, and I can't find the error; the YAML front matter is the same as in our other posts. Here are the two differences:

(1) For some reason, Jekyll is rendering the three dashes at the bottom of the YAML front-matter as a single dash: category: German — Doch is a modal particle,. I have tried deleting these hyphens and retyping them, and that has not solved the problem.

(2) We are trying to create a new category with this post called "German." Jekyll has automatically created our categories from other posts, but in this instance, it is not creating the "German" category and is instead placing the post in a folder of its own.

When I open the page in the browser, I see this at the top:

layout: post author: WordBrewery title: “How to use the German doch” description: “How to use and understand the German modal particle doch.” image: hohenschwangau.jpg featured: true published: true category: German — Doch is a modal particle, a word used to indicate attitude, tone or the focus of a sentence.

Here is the YAML front-matter and first line of the post:

---
layout: post
author: WordBrewery
title: "How to use the German doch"
description: "How to use and understand the German modal particle doch."
image: hohenschwangau.jpg
featured: true
published: true
category: German
---
*Doch* is a [modal particle](https://en.m.wikipedia.org/wiki/German_modal_particle), a word used to indicate attitude, tone or the 

I would greatly appreciate any help.

Appearance of the unparsed post

1
Is the encoding of the file different from posts that are working correctly? - RobertKenny
Be sure to save your file with utf-8 encoding with no BOM. - David Jacquel
Thank you both; I thought that might be the issue and had resaved the encoding as utf-8 in Emacs (the original was drafted on a Windows PC in Atom), but apparently that did not remove the BOM (and the BOM was not visible in whitespace-mode). I then switched to Sublime Text and tried opening it as UTF-8 and saving it as UTF-8, and that worked. Thanks! - WordBrewery
PS - Unfortunately, I have a reputation of 1 and seemingly can't upvote your comments. - WordBrewery

1 Answers

3
votes

(Moved from comments to answer)

You need to make sure that the markdown file encoding is correct (utf8 no BOM). Jekyll has a problem with BOM in the front matter http://jekyllrb.com/docs/frontmatter/