in root.html). Outputs custom og:image with assets_prefix normalisation and non-Google site verification. --> Liquid | zer0-mistakes in _layouts/root.html. What this file adds: - Custom og:image with preview_images.assets_prefix path normalisation for the theme-specific page.preview and page.header.og_image keys. When page.image is set, jekyll-seo-tag handles og:image and this file skips its own og:image output to avoid duplicate tags. - Non-Google site verification tags (Bing, Yandex, Naver, Baidu) Dependencies: - jekyll-seo-tag plugin (loaded in _layouts/root.html via Liquid | zer0-mistakes ) - site.preview_images config in _config.yml =================================================================== --> Liquid | zer0-mistakes Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-04-10 14:49 UTC
Current Environment Production
Build Time Apr 10, 14:49
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Page Location
Page Info
Layout default
Collection docs
Path _docs/liquid/index.md
URL /docs/liquid/
Date 2026-04-10
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Liquid

Liquid is the templating language used by Jekyll to process templates and create dynamic content.

Basic Syntax

Output (Double Braces)

{{ page.title }}
{{ site.description }}
{{ content }}

Logic (Braces with Percent)

{% if page.title %}
  <h1>{{ page.title }}</h1>
{% endif %}

{% for post in site.posts %}
  <li>{{ post.title }}</li>
{% endfor %}

Common Filters

Text Manipulation

{{ "hello" | capitalize }}       <!-- Hello -->
{{ "hello world" | upcase }}     <!-- HELLO WORLD -->
{{ page.content | truncate: 100 }}
{{ page.content | strip_html }}

URL Helpers

{{ "/about/" | relative_url }}   <!-- Prepends baseurl -->
{{ "/about/" | absolute_url }}   <!-- Full URL with domain -->

Date Formatting

{{ page.date | date: "%B %d, %Y" }}  <!-- January 15, 2025 -->
{{ page.date | date_to_xmlschema }}   <!-- 2025-01-15T00:00:00+00:00 -->

Arrays

{{ page.tags | join: ", " }}
{{ site.posts | size }}
{{ page.categories | first }}

Control Flow

Conditionals

{% if page.layout == "post" %}
  <!-- Post content -->
{% elsif page.layout == "page" %}
  <!-- Page content -->
{% else %}
  <!-- Default content -->
{% endif %}

Loops

{% for post in site.posts limit:5 %}
  <a href="{{ post.url }}">{{ post.title }}</a>
{% endfor %}

{% for tag in page.tags %}
  <span>{{ tag }}</span>
{% endfor %}

Includes

Include reusable components:

{% include navigation/navbar.html %}
{% include components/post-card.html post=post %}

Pass parameters to includes:

{% include card.html 
   title="My Card" 
   content="Card content here" 
%}

Theme Examples

Explore Liquid usage in Zer0-Mistakes:

  • _layouts/ - Page templates
  • _includes/ - Reusable components
  • _includes/navigation/ - Navigation components

Resources