algolia / jekyll-algolia

Add fast and relevant search to your Jekyll site
https://community.algolia.com/jekyll-algolia/
MIT License
214 stars 35 forks source link

Allow to upgrade the jekyll dependency to 4 #140

Closed dshevtsov closed 5 years ago

dshevtsov commented 5 years ago

I want to report a bug:

jekyll released 4.0.0 version. But jekyll-algolia only allows minor version upgrades for Jekyll 3.

What is the current behavior?

The plugin restrict major version upgrade to jekyll 4.

What is your expected behavior?

The plugin does not restrict major version upgrade to jekyll 4.

Git repository to reproduce the issue:

Doesn't matter. ### Ruby version used:

Doesn't matter.

Jekyll version used:

3.8.6, but I want to switch to 4.0.0.

luispuerto commented 5 years ago

I forked and added spec.add_runtime_dependency "jekyll", ">= 3.6", "< 5.0" but resulted in jekyll 4.0.0 | Error: no implicit conversion of nil into Hash

mmistakes commented 5 years ago

@luispuerto I forked jekyll-algolia and made the minor spec update and it works fine for me with Jekyll v4.

  1. Forked jekyll-algolia, replaced line 26 with gem.add_runtime_dependency 'jekyll', '>= 3.6', '< 5.0'
  2. Updated my Gemfile to point to the local jekyll-algolia gem I modified:
    group :jekyll_plugins do
      gem 'jekyll-algolia', path: 'path-to-locally-modified-gem\jekyll-algolia-develop'
    end
  3. Run bundle update
  4. Run bundle exec jekyll aglolia
> jekyll -v
jekyll 4.0.0

>bundle exec jekyll algolia --trace
Configuration file: /_config.yml
Processing site...
         AutoPages: Disabled/Not configured in site.config.
        Pagination: Disabled in site.config.
Rendering to HTML (100%) |=====================================================|
Settings are already up to date.
Getting list of existing records
Updating records in index xxxxxxxxxx...
Records to delete: 2850
Records to add: 2850
Updating index (100%) |========================================================|
✔ Indexing complete
luispuerto commented 5 years ago

@mmistakes there is more than just that and it's related to jekyll-archives #126

I've created a branch with #141, #126 and #129 on my fork and now it's working. But I think that what they have to do is review those pull requests and merge.

mmistakes commented 5 years ago

Gotcha. I don't use that plugin so that's probably why it works for me.