Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Liquid tags in a Jekyll page not working

I am attempting to setup a small blog using Jekyll. My work so far is as follows.

  • Setup a Github pages repository
  • Cloned the repo locally
  • Installed Ruby vs 2 and the sdk (windows)
  • Installed jekyll
  • 'serve' the local website.
  • Validated that I could view my website localhost:4000

Everything worked fine however the liquid syntax is not working as expected. All syntax is output as plane text. I am not sure how to continue. This error happens both locally as well as on my github hosted page.

Here is my index.html file

<!DOCTYPE html>
<html lang="en-us">
<head>
  {% include meta %}{{ site.time | date_to_xmlschema }}
</head>
<body>
  {% include header.html %}
  {% include header.html %}
  {% include header.html %}
  {% foo %}
  {{ foo }}

  <section class="main-content">
    {% include footer.html %}
  </section>
  {% include scripts.html %}
</body>
</html>

My _config.yml has foo defined. =(

like image 627
nVentimiglia Avatar asked Apr 15 '15 23:04

nVentimiglia


1 Answers

If you want Jekyll to process your page, you must add a Front matter to your page (see dedicated page in Jekyll documentation).

The minimum front matter is an empty one. That means that your page will use default configuration for layout, etc ..

---
# this is an empty front matter
---
Your content here
like image 164
David Jacquel Avatar answered Oct 16 '22 08:10

David Jacquel