class Jekyll::Post
class Post
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 273 def populate_categories categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories') self.categories = ( Array(categories) + categories_from_data ).map {|c| c.to_s.downcase}.flatten.uniq self.categories.delete("_i18n") self.categories.delete(site.config['lang']) return self.categories end
Also aliased as: populate_categories_org