Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concatreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydecimalformatlengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
flattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
eqgtgtenot
Default
default
Render
Template
template
Docs/Sintax/Files & paths/Path

Path

Pull apart file paths - directory, name, and extension.

Path

dirnameReturns the directory portion of a file path, everything up to but not including the final path element.{{ path | dirname }}extReturns the file extension without the leading dot, for example "png" for "avatar.png".{{ path | ext }}ext_dotReturns the file extension including the leading dot, for example ".png" for "avatar.png".{{ path | ext_dot }}ext_prependInserts an extra extension segment just before the existing file extension, so "styles.css" with "min" becomes "styles.min.css".{{ path | ext_prepend:'min' }}ext_trimReturns the file path without its trailing extension.{{ path | ext_trim }}filenameReturns the base file name from a path, the final path element including its extension.{{ path | filename }}
Edit or read the source on GitHub
PreviousfileNext dirname

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub