Post

Jekyll & Liquid

Jekyll & Liquid

Liquid

Escape Liquid

To avoid Liquid being interpreted, wrap it with between {% raw %} and {% endraw %}.

Include file content relative to current file

1
{% include_relative configs/configuration-file.yaml %}

Include file content from _include directory

1
{% include _include_cir_file %}

Note: Files in _include directory are not directly accessible via URL, as this resource is meant for reusable components (like partials) to be dynamically included in templates or posts.

Jekyll

Prerequisites

Node

  • [Linux] nvm is fine
  • [Windows] nvm-for-windows is fine
1
nvm -v

Ruby + Jekyll

  • [Linux] rbenv is fine
  • [Windows] don’t use rbenv-for-windows - it’s bugged
1
ruby -v

Installation

1
2
gem install jekyll bundler
bundle exec jekyll -v

Run

1
bundle exec jekyll serve

or shorter:

1
bundle exec jekyll s

Remember to add bundle exec before all jekyll commands (docs).