diff --git a/plugins/category_generator.rb b/plugins/category_generator.rb
index bb5fd32..77e06af 100644
--- a/plugins/category_generator.rb
+++ b/plugins/category_generator.rb
@@ -141,10 +141,7 @@ module Jekyll
# Returns string
#
def category_links(categories)
- dir = @context.registers[:site].config['category_dir']
- categories = categories.sort!.map do |item|
- "#{item}"
- end
+ categories = categories.sort!.map { |c| category_link c }
case categories.length
when 0
@@ -156,6 +153,17 @@ module Jekyll
end
end
+ # Outputs a single category as an link.
+ #
+ # +category+ is a category string to format as an link
+ #
+ # Returns string
+ #
+ def category_link(category)
+ dir = @context.registers[:site].config['category_dir']
+ "#{category}"
+ end
+
# Outputs the post.date as formatted html, with hooks for CSS styling.
#
# +date+ is the date object to format as HTML.