Class: Jekyll::ClientSearch::SearchIndexPage
- Inherits:
-
PageWithoutAFile
- Object
- PageWithoutAFile
- Jekyll::ClientSearch::SearchIndexPage
- Defined in:
- lib/jekyll/client_search/search_index_page.rb
Overview
A Jekyll page that renders the search documents as JSON at the configured output path.
Instance Method Summary collapse
-
#initialize(site, output, documents) ⇒ SearchIndexPage
constructor
A new instance of SearchIndexPage.
Constructor Details
#initialize(site, output, documents) ⇒ SearchIndexPage
Returns a new instance of SearchIndexPage.
8 9 10 11 12 |
# File 'lib/jekyll/client_search/search_index_page.rb', line 8 def initialize(site, output, documents) super(site, site.source, File.dirname(output), File.basename(output)) self.data = { "layout" => nil, "sitemap" => false } self.content = JSON.generate(documents) end |