diff options
Diffstat (limited to '.themes/classic/plugins')
-rw-r--r-- | .themes/classic/plugins/category_generator.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.themes/classic/plugins/category_generator.rb b/.themes/classic/plugins/category_generator.rb index 8fd26682..c2e9a46e 100644 --- a/.themes/classic/plugins/category_generator.rb +++ b/.themes/classic/plugins/category_generator.rb @@ -129,8 +129,10 @@ module Jekyll # Returns string # def category_links(categories) + dir = @context.registers[:site].config['category_dir'] + root_url = @context.registers[:site].config['root'] categories = categories.sort!.map do |item| - "<a class='category' href='/#{@context.registers[:site].config['category_dir']}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>" + "<a class='category' href='#{root_url}/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>" end case categories.length |