yaml front matter in a haml file
haml, html, jekyll, jekyll-extensions, yaml
Solution
Use a back slash:
haml file:
\---
user: hello
\---
%html
%title RudyIndustries
%body
%h1 Hello World! {{ page.user }}
compiles into the following html:
---
user: hello
---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title>RudyIndustries</title>
<body>
<h1>Hello World! {{ page.user }}</h1>
</body>
</html>
Problem
I am attempting to use the haml-jekyll-extension only I do not understand how to include yaml front matter? I have the following: ``` --- user: hello --- !!! %html %title RudyIndustries %body %h1 Hello World! {{ page.user }} ``` but it ends up getting compiled into the following html: ``` user: hello <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <title>RudyIndustries</title> <body> <h1>Hello World! {{ page.user }}</h1> </body> </html> ``` How to do I mark the yaml front matter such that it gets compiled into html properly?