Skip to content

Anatomy of a slug

A slug is built by four transformations: lowercase, diacritic stripping, whitespace and punctuation folding to hyphens, and truncation to a safe length.

graph LR
  A["¿Cómo crear un jardín?"] -->|lowercase| B["¿cómo crear un jardín?"]
  B -->|strip diacritics| C["¿como crear un jardin?"]
  C -->|fold punctuation to hyphen| D["como-crear-un-jardin"]
  D -->|truncate| E["como-crear-un-jardin"]
  style A fill:#FFF3E0
  style E fill:#E8F5E9