Warning
This project is still highly experimental, but we would be delighted to receive feedback (but please be careful with production).
A very small (and portable) slugifier implementation.
The implementation is relatively naïve and opinionated, but should be sufficient for most use cases. It has largely been imported from YOCaml (which provides its own implementation) and is small, with no dependencies, making it easy to use with Js_of_ocaml and Mirage. The implementation attempts to intelligently merge separators and is fairly configurable. A more ambitious implementation is provided by the Slug package.
# "Hello world, this is a slug héhéhé"
|> Slugline.from_string
|> Slugline.to_string ;;
- : string = "hello-world-this-is-a-slug-hehehe"