18

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. =(

1 Answer 1

35

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
6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.