Reputation: 6123
I'm currently using jekyll to build a static site and it appears that the HTML files are not parsing liquid.
My current directory structure looks like
_layouts
page.html
index.html
index.html:
---
layout: page
title: home
---
{{ foo }}
When I visit http://host/index.html
, the layout is applied as expected but the page doesn't evaluate {{ foo }}
but instead prints the string {{ foo }}
.
Upvotes: 4
Views: 1527
Reputation: 36421
You don't show us where and how you defined foo
.
There are several possible ways how to do that...and for each one, the syntax to display the value is slightly different:
Declaration:
foo: whatever
To display it on the page:
{{ site.foo }}
Declaration:
---
foo: whatever
---
To display it on the page:
{{ page.foo }}
Declaration:
{% assign foo = 'whatever' %}
To display it on the page:
{{ foo }}
Upvotes: 4