permalink generation removing special characters and spaces #782

nalmeida opened this Issue Jan 28, 2013 · 8 comments


None yet

5 participants

I am using the following configuration:
permalink: /:categories/:title
to generate my posts folder structure but I would like to remove every special characters and also replace all the spaces for "-"

My category name is: "Acentuação"



Is there any way to do it without changing the Jekyll core?
Any plug-in?


I have found a external lib to do this replacement.

I have tested importing it inside the post.rb and passing the slug and the c variables trough the urlize method:

"title"      => CGI.escape(slug.urlize),   # removing accents
"i_day"      => date.strftime("%d").to_i.to_s,
"i_month"    => date.strftime("%m").to_i.to_s,
"categories" => { |c| URI.escape(c.urlize) }.join('/'),   # removing accents
parkr commented Jan 31, 2013

Cool! I'll take a look at this more closely soon.

nalmeida commented Feb 6, 2013

The suggested fix would also add the possibility of having multi-word category names such as:

layout: post
title: Bla
 - My assome category with Acentuação

Currently, it creates the following site structure


Using the urlize it will be:

@x3ro x3ro added a commit to x3ro/jekyll that referenced this issue Apr 9, 2013
@x3ro x3ro Refactor URL processing/generation into separate module
This is done to prepare for improved permalink generation
for URLs containing special characters, as proposed in
issue #782
parkr commented Apr 14, 2013

@mojombo Do you think we can push this off until post-1.0 as well? Once 1.0 is out, I'm hoping to release every couple weeks with bug fixes and the like. No need to wait on 1.0 until this is done, in my opinion.

mojombo commented Apr 14, 2013

Yeah definitely bump this to a future release. Character manipulation is something that will take some time to work through, and we'll need to be careful about backwards compatibility.

x3ro commented Apr 16, 2013

@mojombo @parkr Since the refactored URL generation in #944 does not modify the current behavior so far, it could be merged before actually making any changes to the URL generation, right? This would make the actual modification at a later date easier, and would also allow adding custom URL segments easier than it is currently possible.

parkr commented Feb 17, 2014

Implementing this in core will break any URLs created with the current system, and maintaining backwards compatibility is more effort than it'd be worth. If anything, we should have a means of "translating" category names, but i18n is a ways off, too.

Closing this out as inviable.

@parkr parkr closed this Feb 17, 2014
@fusilli fusilli referenced this issue in jekyll/jekyll-help May 17, 2015

category with 2 words url problems #129

I try to add this Lib( to my project but i'ts not working...
Can someone give me some reference to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment