Note that the initial version of Ema used Slug in its routing system, but not anymore in the latest version. The Slug type is still left in the library for using as a helper.
A slug is a component of a URL or file path. In an URL like
/foo/bar, there are two slugs: “foo” and “bar”. URLs (as well as filepaths) can therefore be represented as lists of slugs (
import Ema (Slug) type URL = [Slug]
Slugs are automatically unicode normalized to NFC to ensure that route links work reliably regardless of the underlying representation of any non-ascii link text.
encodeSlug allow you to convert between URLs and slugs.