Module SlugSource

Generate url safe slug from a string Data and general algorithm is taken from https://github.com/simov/slugify

This library assumes all strings are UTF-8. General algorithm:

Example:

  let vi = Charmap.mk_charmap [Slug_data.base; Slug_data.vi]
  
  let my_slug = slugify ~charmap: vi "my string"
Sourcemodule Charmap : sig ... end
Sourceval slugify : ?sep:string -> ?charmap:Charmap.t -> ?lowercase:bool -> string -> string

slugify ?sep ?charmap ?lowercase string generates slug from string by replacing whitespaces with sep and replacement characters from charmap

sep defaults to "-" charmap defaults to Charmap.base lowercase defaults to true

Sourcemodule Slug_data : module type of Slug_data