slashdotdash / jekyll-lunr-js-search

[UNSUPPORTED] Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
MIT License
548 stars 109 forks source link

Conflict between Gems? #115

Open vallieres opened 7 years ago

vallieres commented 7 years ago

I'm baffled by this. My homepage uses the Paginator object and I also have a category paginator plugin. Both work fine and paginate my content. However, when I add the jekyll-lunr-js-search my homepage paginator stops working and displays no post from paginator.posts.

If I change the order of the Gems in my Gemfile and _config.yml, however, it works...

Before (breaking):

Gemfile

group :jekyll_plugins do
   gem "jekyll-feed"
   gem 'jekyll-gist'
   gem 'jekyll-archives'
   gem 'jekyll-paginate'
   gem 'jekyll-paginate-categories'
   gem 'jekyll-lunr-js-search'
end

_config.yml

gems:
  - kramdown
  - jekyll-watch
  - jekyll-gist
  - jekyll-paginate
  - jekyll-lunr-js-search

After (working):

Gemfile

group :jekyll_plugins do
   gem 'jekyll-lunr-js-search'
   gem "jekyll-feed"
   gem 'jekyll-gist'
   gem 'jekyll-archives'
   gem 'jekyll-paginate'
   gem 'jekyll-paginate-categories'
end

_config.yml

gems:
  - kramdown
  - jekyll-lunr-js-search
  - jekyll-watch
  - jekyll-gist
  - jekyll-paginate

Could there be a conflict between the Paginator object (or the index.html at the root of the site) and your plugin?