# File lib/jekyll/related_posts.rb, line 16 def build return [] unless site.posts.size > 1 if site.lsi build_index lsi_related_posts else most_recent_posts end end
# File lib/jekyll/related_posts.rb, line 28 def build_index self.class.lsi ||= begin lsi = ClassifierReborn::LSI.new(:auto_rebuild => false) display("Populating LSI...") site.posts.each do |x| lsi.add_item(x) end display("Rebuilding index...") lsi.build_index display("") lsi end end
Generated with the Darkfish Rdoc Generator 2.