slugify
Converts a string into a URL-friendly slug.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
str | string | The string to convert into a slug. |
Returns
Section titled “Returns”string — A lowercase, hyphen-separated slug safe for URLs.
Examples
Section titled “Examples”Create a URL-safe slug
Section titled “Create a URL-safe slug”Converts a string into a lowercase, hyphen-separated slug.
Handle accented characters
Section titled “Handle accented characters”Normalizes Unicode characters and strips diacritics.
