X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/9e7a7c7de4a90cdc636b2800931fb4d664d37fbf..d3547e5fc5186be997e4f09bb4a21d50fb0dcf7f:/personal/_plugins/categories.rb?ds=sidebyside diff --git a/personal/_plugins/categories.rb b/personal/_plugins/categories.rb index 4d08693..3e0fabe 100644 --- a/personal/_plugins/categories.rb +++ b/personal/_plugins/categories.rb @@ -11,7 +11,7 @@ module Jekyll self.read_yaml(File.join(base, '_layouts'), layout) self.data['category'] = category # this tells the site template to add a link to the RSS feed - category_title_prefix = site.config['blog']['category_title_prefix'] || 'Category: ' + category_title_prefix = site.config['blog']['title'] + ": " self.data['title'] = "#{category_title_prefix}#{category.capitalize}" end end @@ -36,7 +36,7 @@ module Jekyll end # Adds some extra filters used during the category creation process. - module Filters + module CategoryFilter # Outputs a list of categories as comma-separated links. This is used # to output the category list for each post on a category page. @@ -62,3 +62,5 @@ module Jekyll end end end + +Liquid::Template.register_filter(Jekyll::CategoryFilter)