922 B
922 B
liquid
A templating language have 3 components ie objects, tags and filter
- objects are for values of variables.
{{page.title}}will display value ofpage.title - tags : for control flow
{% if page.show_sidebar %}
<div class="sidebar">
sidebar content
</div>
{% endif %}
- fllter : to change output
eg:
{{ "hi" | capitalize }}will displayHi
Front matter Front matter is a snippet of YAML placed between two triple-dashed lines at the start of a file.
- front matter variables
calling value front end matter variable--- my_number: 5 ---{{ 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>