joplin-notes/joplin notion extension/Web Development/Extras/jekyll/liquid.md
2026-11-04 00:33:23 +05:30

922 B

liquid

A templating language have 3 components ie objects, tags and filter

  1. objects are for values of variables. {{page.title}} will display value of page.title
  2. tags : for control flow
{% if page.show_sidebar %}
  <div class="sidebar">
    sidebar content
  </div>
{% endif %}
  1. fllter : to change output eg: {{ "hi" | capitalize }} will display Hi  

Front matter Front matter is a snippet of YAML placed between two triple-dashed lines at the start of a file.

  • front matter variables
    ---
    my_number: 5
    ---
    
    calling value front end matter variable
    {{ page.my_number }}
    

example

---
# front matter tells Jekyll to process Liquid
title: home
---

<!DOCTYPE html>
<html>
 <head>
   <meta charset="utf-8">
   <title>{{ page.title | capitalize  }}</title>
 </head>
 <body>
   <h1>{{ "Hello World!" | downcase }}</h1>
 </body>
</html>