1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00
danbarber.me/_plugins/categories.rb
2017-08-16 16:00:16 -04:00

17 lines
427 B
Ruby

module Jekyll
module CategoriesFilter
# Outputs a list of categories as comma-separated <a> links. This is used
# to output the category list for each post on a category page.
#
# +categories+ is the list of categories to format.
#
# Returns string
#
def category_list(categories)
categories.sort.join(", ")
end
end
end
Liquid::Template.register_filter(Jekyll::CategoriesFilter)