Getting started Liquid Template Language

Github Blog 테마의 Jekyll minimal mistakes를 사용하기로 결정을 하고 Liquid Template Language를 학습하기 위해 liguid 가이드 홈페이지 기반으로 학습을 진행하였습니다.


Object

Objects contain the content that Liquid displays on a page.

{{ page.title }}


Tag

Tags create the logic and control flow for templates.

{% if product.title == "Shirt" or product.type == "Shoes" %}
	This is a shirt or a pair of shoes.
{% endif %}


Filter

Filters change the output of a Liquid object or variable.

{{ "/my/fancy/url" | append: ".html" }} # /my/fancy/url.html
{{ "adam!" | capitalize | prepend: "Hello " }} # Hello Adam!

append, prepend, downcase, capitalize . . .


Hyphen

strip whitespace from the left or right side of a rendered tag.

{{- assign my_variable = "tomato" -}}
{{ my_variable }}


assign

동적 할당

{{- assign my_variable = "tomato" -}}
{{ my_variable }}