mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-17 06:35:18 -05:00
Downcased category urls
This commit is contained in:
parent
c604af28da
commit
31b5388402
@ -70,7 +70,7 @@ module Jekyll
|
|||||||
if self.layouts.key? 'category_index'
|
if self.layouts.key? 'category_index'
|
||||||
dir = self.config['category_dir'] || 'categories'
|
dir = self.config['category_dir'] || 'categories'
|
||||||
self.categories.keys.each do |category|
|
self.categories.keys.each do |category|
|
||||||
self.write_category_index(File.join(dir, category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-')), category)
|
self.write_category_index(File.join(dir, category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase), category)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Throw an exception if the layout couldn't be found.
|
# Throw an exception if the layout couldn't be found.
|
||||||
@ -107,7 +107,7 @@ module Jekyll
|
|||||||
def category_links(categories)
|
def category_links(categories)
|
||||||
dir = @context.registers[:site].config['category_dir']
|
dir = @context.registers[:site].config['category_dir']
|
||||||
categories = categories.sort!.map do |item|
|
categories = categories.sort!.map do |item|
|
||||||
"<a class='category' href='/#{dir}/#{item.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-')}/'>#{item}</a>"
|
"<a class='category' href='/#{dir}/#{item.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase}/'>#{item}</a>"
|
||||||
end
|
end
|
||||||
|
|
||||||
case categories.length
|
case categories.length
|
||||||
|
Loading…
Reference in New Issue
Block a user