{{ 'Hello, World!' | slug }}

{# outputs 'hello-world' #}

The slug filter takes a separator value as the first argument:

{{ 'Hello, World!' | slug('_') }}

{# outputs 'hello_world' #}

Arguments

ArgumentDescriptionType
separatorThe separatorString
languageThe language. Defaults to enString

Was this helpful?

Copyright © 2024 Blutui.