![]() | |||||||||
| |||||||||
How To/Convert title string to url slugWhen making your urls looking better, you may want to convert a title to a url-slug.
An url-slug is in common a string containing only alphanumeric letters and ‘-’. Following lua function converts a normal title string to a url-slug. Code function toSlug(str) The toSlug function also replaces multiple spaces with one ‘-‘ only.
| |||||||||