Guides

Filters

Filters transform template values before Markdown parsing. Nizel includes built-in filters from @sil/format and @sil/case.

Case Filters

From @sil/case:

FilterInputOutput
camelhello worldhelloWorld
capitalhello worldHello world
constanthello worldHELLO_WORLD
dothello worldhello.world
headerhello worldHello-World
kebabhello worldhello-world
lowerHello Worldhello world
pascalhello worldHelloWorld
pathhello worldhello/world
sentencehello worldHello world
snakehello worldhello_world
titlehello worldHello World
upperhello worldHELLO WORLD

Format Filters

From @sil/format:

FilterUsageDescription
formatformat('currency', 'EUR')Format a number as currency
formatformat('date', 'dd MMM yyyy')Format a date string
formatformat('number', '0.00')Format a number with pattern

Usage

---
title: ""
slug: ""
---

# {{ meta.title }}

Price: €0.00
Date: NaN January,February,March,April,May,June,July,August,September,October,November,December NaN
Status: 

Chaining

Filters can be chained: