class Jekyll::Document
class Document
Public Instance Methods
populate_categories()
click to toggle source
¶ ↑
populate_categories Monkey patched this method to remove unwanted strings ("_i18n" and language code) that are prepended to posts categories because of how the multilingual posts are arranged in subfolders.
¶ ↑
# File lib/jekyll-multiple-languages-plugin.rb, line 304 def populate_categories data['categories'].delete("_i18n") data['categories'].delete(site.config['lang']) merge_data!({ 'categories' => ( Array(data['categories']) + Utils.pluralized_array_from_hash(data, 'category', 'categories') ).map(&:to_s).flatten.uniq }) end
Also aliased as: populate_categories_org