1. Home
  2. Liquid
  3. Slugify

Convert some text to a URL safe string. Use the following flags for different results - "pretty", "ascii", "latin".

#liquid#filter
{{ "It works 100%, even with an 'ó' character!" | slugify }}
it-works-100-even-with-an-ó-character

{{ "It works 100%, even with an 'ó' character!" | slugify: "pretty" }}
it-works-100-,-even-with-an-'ó'-character!

{{ "It works 100%, even with an 'ó' character!" | slugify: "ascii" }}
it-works-100-even-with-an-character

{{ "It works 100%, even with an 'ó' character!" | slugify: "latin" }}
it-works-100-even-with-an-o-character
copy
Full Liquid cheatsheet