Jekyll Algolia Plugin
Jekyll plugin to automatically index your content on Algolia.
Usage
$ bundle exec jekyll algolia
This will push the content of your Jekyll website to your Algolia index.
Documentation
Full documentation can be found on
https://community.algolia.com/jekyll-algolia/
Installation
The plugin requires at least Jekyll 3.6.0 and Ruby 2.3.0.
First, add the jekyll-algolia
gem to your Gemfile
, in the :jekyll_plugins
section.
# Gemfile group :jekyll_plugins do gem 'jekyll-algolia', '~> 1.0' end
Once this is done, download all dependencies with bundle install
.
Basic configuration
You need to provide certain Algolia credentials for this plugin to index your
site.
If you don’t yet have an Algolia account, you can open a free Community plan
here. Once signed in, you can get your credentials from
your dashboard.
Once you have your credentials, you should define your application_id
and
index_name
inside your _config.yml
file like this:
# _config.yml algolia: application_id: 'your_application_id' index_name: 'your_index_name'
Run it
Once your credentials are setup, you can run the indexing by running the
following command:
ALGOLIA_API_KEY='{your_admin_api_key}' bundle exec jekyll algolia
Note that ALGOLIA_API_KEY
should be set to your admin API key.
Thanks
Thanks to Anatoliy Yastreb for a great tutorial on creating Jekyll
plugins.