Files
2026-05-17 10:14:14 -06:00

9 lines
263 B
Python

import re
import unicodedata
def slugify(value: str) -> str:
normalized = unicodedata.normalize("NFKD", value).encode("ascii", "ignore").decode("ascii")
slug = re.sub(r"[^a-zA-Z0-9]+", "-", normalized).strip("-").lower()
return slug or "sin-titulo"