Using Persian characters in generating slug

- 1 min

Amazing effect of using human readable title in naming page’s path to improve SEO, is not deniable for web developers and SEO specialists. URL encoding only accepts a specified characters and the other characters must be transformed.

Take space character as an example, it must be translated to %20. To be human readable these characters should be removed.

There is some gems to make slug from strings. But all of them supports only ASCII characters and other UTF-8 characters like Persian character set will be removed. Slugifa is developed to support Persian character set in generating slug. A brief guide of this gem is provided in following.

gem install slugifa

usage examples

require 'slugifa'

'Mohsen Alizadeh presents'.slugifa
# => "mohsen-alizadeh-presents"

'برگزاری‌ آنلاین مسابقات'.slugifa
 # => "برگزاری-آنلاین-مسابقات"
Mohsen Alizadeh

Mohsen Alizadeh

I am a Software Developer living in Frankf.
My interests span Backend Development with Ruby On Rails && Elixir, System Architecture Design, Sytem Reliability, and System Scalability.

rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora