Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions slugify
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ to_slug() {
# Forcing the POSIX local so alnum is only 0-9A-Za-z
export LANG=POSIX
export LC_ALL=POSIX
#replace ' with nothing
sed -e "s/[\']//g" |
#transliterate special chars
iconv -f UTF-8 -t ASCII//TRANSLIT |
# Keep only alphanumeric value
sed -e 's/[^[:alnum:]]/-/g' |
# Keep only one dash if there is multiple one consecutively
Expand Down