A placeholder is a name in double braces. {{ title }} is a value from the row, {{ page.title }} a value of the page, {{ site.url }} the address from the site settings, {{ alcove:name }} another alcove and {{ tiles }} the rendered rows.
Every value is HTML-escaped. Filters follow a | and run from left to right:
Filter
Effect
upper, lower
Change case
truncate:N
Cut to N characters and add ...
split
Split a comma separated value into a list
chip, chip:class
Wrap every item in a span
raw
Do not escape. Meant for fields declared as type: html
The live result runs every filter on the one row below and shows what came out.
Live result This page is a static file, built once.
Written in the template
Shown
{{ title }}
the age of innocence
{{ title|upper }}
THE AGE OF INNOCENCE
{{ blurb|truncate:32 }}
Old New York, an engagement and ...
{{ tags|split }}
novel, new york, 1920
{{ tags|split|chip:tag }}
novelnew york1920
{{ note }}
<em>Pulitzer Prize</em>, 1921
{{ note_html|raw }}
Pulitzer Prize, 1921
Source the files behind the result above
content/alcoves/demo_filters/alcove.yaml
fields:
- name: title
type: text
- name: blurb
type: textarea
- name: tags
type: text
- name: note
type: text
- name: note_html
type: html
data:
- title: the age of innocence
blurb: Old New York, an engagement and a countess who does not follow the rules.
tags: novel,new york,1920
note: "<em>Pulitzer Prize</em>, 1921"
note_html: "<em>Pulitzer Prize</em>, 1921"