class GitHubPages::Configuration

The github-pages gem will automatically disable every plugin that is not in the whitelist of plugins allowed by GitHub. This includes any plugin defined in the `_plugins` folder as well.

Users of the jekyll-algolia plugin will use custom plugins in _plugins to define custom hooks to modify the indexing. If they happen to have the github-pages gem installed at the same time, those hooks will never be executed.

The GitHub Pages gem prevent access to custom plugins by doing two things:

We cancel those by disabling safe mode and forcing back plugins to be read from ./_plugins.

This file will only be loaded when running `jekyll algolia`, so it won't interfere with the regular usage of `jekyll build`

Public Class Methods

set!(site) click to toggle source
# File lib/jekyll/algolia/overwrites/githubpages-configuration.rb, line 24
def set!(site)
  config = effective_config(site.config)
  config['safe'] = false
  config['plugins_dir'] = '_plugins'
  site.config = config
end