Modifier: slugify


Converts the string into an URL slug. This includes replacing non-ASCII characters with their closest ASCII equivalents, removing remaining non-ASCII and non-alphanumeric characters, and replacing whitespace with dashes. And then everything is lowercased.

YAML
string: Please, have some lemoñade.
Template
{{ string | slugify }}
Output
please-have-some-lemonade

Additional Reading

Learn how to use and chain modifiers in the Antlers template guide.

Last modified on March 31, 2016