Class: Jekyll::ClientSearch::RelatedPage

Inherits:
PageWithoutAFile
  • Object
show all
Defined in:
lib/jekyll/client_search/related_page.rb

Overview

Writes build-time related-article data as a standalone JSON page.

Instance Method Summary collapse

Constructor Details

#initialize(site, output, relation_data) ⇒ RelatedPage

Returns a new instance of RelatedPage.



7
8
9
10
11
# File 'lib/jekyll/client_search/related_page.rb', line 7

def initialize(site, output, relation_data)
  super(site, site.source, File.dirname(output), File.basename(output))
  self.data = { "layout" => nil, "sitemap" => false }
  self.content = JSON.generate(relation_data)
end