default
Return a specified fallback value when the input variable evaluates to false, nil, or an empty string.
Syntax
{{ variable | default: fallback }}Example
{% assign bio = "" %}{{ bio | default: "Information available upon request." }}Output
Information available upon request.The default filter acts as an inline fallback guard, returning a specified replacement string whenever the primary variable evaluates to nil, false, or an empty string.
On keyword combination landing pages, default is the primary defense against thin content penalties resulting from missing CSV cells. For example: {{ row.opening_hours | default: 'Mon-Fri 9:00 AM - 5:00 PM' }}. By providing contextual fallbacks across optional columns, every generated page maintains complete paragraph structures and robust semantic depth.
Filters
- abs
- append
- at_least
- at_most
- capitalize
- ceil
- compact
- concat
- date
- default
- divided_by
- downcase
- escape
- escape_once
- first
- floor
- join
- last
- lstrip
- map
- minus
- modulo
- newline_to_br
- plus
- prepend
- remove
- remove_first
- replace
- replace_first
- reverse
- round
- rstrip
- size
- slice
- sort
- sort_natural
- split
- strip
- strip_html
- strip_newlines
- times
- truncate
- truncatewords
- uniq
- upcase
- url_decode
- url_encode
- where
- raw
- slugify
- number_format
