1

I would like to use Liquid templates with Middleman rather than the default ERb.

I know I need to go into config.rb and require it but i'm not sure of the exact syntax I need to use in config.rb to achieve this. I am also unsure of whether I need to just download Liquid from the Liquid website or whether I need to download tilt for this to work?

olliew
  • 183
  • 1
  • 7

1 Answers1

0

You would need to install the liquid gem in your Gemfile e.g. gem 'liquid', '~> 3.0.0', :require => false.

Then in the config.rb you can set the liquid engine using set :liquid, :layout_engine => :liquid

Then for your files if you add the .liquid extension to the name e.g. index.html.liquid, they will be run through the liquid processor.

Checkout this project as an example https://github.com/Palmaswell/liquid-bourbon-middleman

Gerard Condon
  • 761
  • 1
  • 7
  • 22