slashdotdash / jekyll-lunr-js-search

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

jekyll_lunr_js_search.rb:16:in `merge!': no implicit conversion of nil into Hash (TypeError) #18

Closed cheshire137 closed 10 years ago

cheshire137 commented 10 years ago

I get the following error trying to start jekyll serve after following all instructions in your README:

% jekyll serve --trace
Configuration file: /my_jekyll/_config.yml
/my_jekyll/_plugins/jekyll_lunr_js_search.rb:16:in `merge!': no implicit conversion of nil into Hash (TypeError)
  from /my_jekyll/_plugins/jekyll_lunr_js_search.rb:16:in `initialize'
  from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/jekyll-1.4.3/lib/jekyll/site.rb:354:in `new'
cheshire137 commented 10 years ago

I fixed this by adding the following to my _config.yml:

lunr_search:
  excludes: [rss.xml, atom.xml]

I hadn't added anything to _config.yml because I didn't want to add custom stop words. Maybe update your README to say you have to add lunr_search to your _config.yml even if you don't want to customize?

slashdotdash commented 10 years ago

@moneypenny thanks for the feedback on the missing lunr_search config setting breaking the plugin.

slashdotdash commented 10 years ago

Fixed by 4a4e855f099c121f7e17e464a9cda35413488664.