{{ post.title }}
{{ post.excerpt }}
KevsRobots Learning Platform
70% Percent Complete
By Kevin McAleer, 2 Minutes

Liquid is a templating language used by Jekyll to process templates. It allows you to add dynamic content, use variables, and implement logic in your siteβs pages and posts. Understanding Liquid is essential for maximizing the power of Jekyll as a static site generator.
Liquid syntax is simple and consists of objects, tags, and filters:
{{ }}.{% %}.{{ 'data' | filter }}.You can use objects to display data from your siteβs configuration file (_config.yml), front matter, or page content:
{{ site.title }} {{ page.author }}
Tags allow you to implement control flow statements like if, else, elsif, and loops using for.
{% if page.title %}
{% else %}
{% endif %}
To iterate over a list of items, such as posts:
{% for post in site.posts %}
{{ post.excerpt }}
{% endfor %}
Filters allow you to modify the output of objects for formatting or transforming data:
| {{ βWelcome to Jekyll!β | upcase }} |
This filter changes the string to uppercase.
You can use the arrows β β on your keyboard to navigate between lessons.
Comments