JekyllSearch
Installation
Add this line to your application's Gemfile:
source 'https://rubygems.org'
group :jekyll_plugins do
gem 'jekyll_search'
end
or for bleeding edge:
group :jekyll_plugins do
gem 'jekyll_search', :git => 'https://github.com/choffmeister/jekyll_search.git', :branch => 'develop'
end
And then execute:
$ bundle
Usage
First you need a machine with Elasticsearch installed. Then configure the search plugin by adding
the following entries into your Jekyll _config.yml (replace the host entry if needed):
# Search index settings
search:
host: localhost:9200
index:
name: myindex
Now run jekyll index to iterate over all pages and index them with Elasticsearch. With jekyll search my query
you can throw some test searches against your freshly created search index.
If you want to customize how Elasticsearch creates the search index, then provide an additional index.settings
property in your _config.yml (see here:
# Search index settings
search:
host: localhost:9200
index:
name: myindex
settings:
mappings:
page:
properties:
url:
type: string
analyzer: keyword
title:
type: string
analyzer: english
content:
type: string
analyzer: english
Contributing
- Fork it ( https://github.com/choffmeister/jekyll_search/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request