X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/ef3c90204b29069bc815c0bd659af338e73629d5..cc84da6ade90257a16faf634b9e895b34841522a:/ralf/_plugins/categories.rb diff --git a/ralf/_plugins/categories.rb b/ralf/_plugins/categories.rb index 65776d7..4d08693 100644 --- a/ralf/_plugins/categories.rb +++ b/ralf/_plugins/categories.rb @@ -45,11 +45,9 @@ module Jekyll # # Returns string def category_links(categories) - base_dir = @context.registers[:site].config['blog']['category_dir'] + cat_base_dir = File.join(@context.registers[:site].config['baseurl'], @context.registers[:site].config['blog']['category_dir']) categories = categories.sort!.map do |category| - category_url = File.join(base_dir, "#{category}.html") - # Make sure the category directory begins with a slash. - category_dir = "/#{category_dir}" unless category_dir =~ /^\// + category_url = File.join(cat_base_dir, "#{category}.html") "#{category.capitalize}" end