# File lib/jekyll/related_posts.rb, line 16 def build return [] unless self.site.posts.size > 1 if self.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 = Classifier::LSI.new(:auto_rebuild => false) display("Populating LSI...") self.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.