remove leading slash from page.url and post.url

This commit is contained in:
maul.esel 2013-04-19 16:37:48 +02:00
parent ba64a9fe30
commit c6df2e150a
2 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,7 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A\//, '')
@url
end

View File

@ -194,6 +194,7 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A\//, '')
@url
end