Finally a nice solution for mapping relative urls
This commit is contained in:
parent
44e1351fc7
commit
39d56bc988
13 changed files with 38 additions and 29 deletions
|
|
@ -130,7 +130,7 @@ module Jekyll
|
|||
#
|
||||
def category_links(categories)
|
||||
dir = @context.registers[:site].config['category_dir']
|
||||
root_url = @context.registers[:site].config['root']
|
||||
root_url = @context.registers[:site].config['root'].sub(/\/$/, '')
|
||||
categories = categories.sort!.map do |item|
|
||||
"<a class='category' href='#{root_url}/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue