walish / jekyll-algolia

Add fast and relevant search to your Jekyll site

Home Page:https://community.algolia.com/jekyll-algolia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jekyll Algolia Plugin

Gem Version Build Status Coverage Status Code Climate Jekyll >= 3.6.0 Ruby >= 2.3.0

Add fast and relevant search to your Jekyll site.

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.

About

Add fast and relevant search to your Jekyll site

https://community.algolia.com/jekyll-algolia/

License:MIT License


Languages

Language:Ruby 50.8%Language:CSS 31.0%Language:JavaScript 12.4%Language:HTML 5.4%Language:Shell 0.5%