What Makes a Good Slug: Rules That Hold Up
Ask what makes a good slug and most answers jump straight to web addresses, but slugs live everywhere identifiers do: filenames, image assets, anchor links, database keys, CMS entry names, S3 buckets. A slug is text flattened into its safest possible form, letters, digits, and one separator, nothing else. Get the flattening rules right and the same string works in a URL path, a shell script, and a config key without quoting or escaping anywhere. This guide covers the mechanics: diacritics, symbols, whitespace, separators, and the failure modes that surface months later.