HTML Entities in Jekyll Titles

January 08, 2014

One of my posts had quotation marks in its title and it wasn’t going well. The Jekyll generator kept spewing errors like…

YAML Exception reading <full path to file>: (<unknown>): 
did not find expected key while parsing a block mapping at line 2 column 1

I found a simple workaround here, on the Terry Hyde blog. Just put the title with quotes on a separate line. Rather than

title: "Comments" in .railsrc

or even

title: &quot;Comments&quot; in .railsrc


title: |
    &quot;Comments&quot; in .railsrc

Thanks Chris!

Tags: jekyll, yaml
comments powered by Disqus