Class: Jekyll::ClientSearch::Generator
- Inherits:
-
Generator
- Object
- Generator
- Jekyll::ClientSearch::Generator
- Defined in:
- lib/jekyll/client_search/generator.rb
Overview
Jekyll generator that emits the search index JSON and copies browser runtime assets (base + selected engine adapter) for client-side JavaScript search engines. Optionally enhances documents with embeddings from a local Ollama server, using a content-hash cache to avoid re-embedding unchanged documents.
Instance Method Summary collapse
Instance Method Details
#generate(site) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/jekyll/client_search/generator.rb', line 14 def generate(site) configuration = Configuration.new(site) return unless configuration.enabled? documents = build_documents(site, configuration) documents = (site, documents, configuration) if configuration. add_generated_pages(site, documents, configuration) add_runtime_asset(site, configuration) if configuration.copy_runtime? end |