Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

can you provide a sample jekyll site with lunr search integrated? #61

Open
tomjoht opened this issue Jan 31, 2015 · 7 comments
Open

can you provide a sample jekyll site with lunr search integrated? #61

tomjoht opened this issue Jan 31, 2015 · 7 comments

Comments

@tomjoht
Copy link

tomjoht commented Jan 31, 2015

Can you create a sample jekyll site with a plain integration of lunr search using the pre-built plugin method rather than the rubygem installation method? I had a hard time following the instructions but feel if i had example code, I could figure it out. If I could download the sample site, that would be perfect.

@flohei
Copy link

flohei commented Jan 31, 2015

I saved my integration here. Hope this helps.

@tomjoht
Copy link
Author

tomjoht commented Jan 31, 2015

Awesome! Thanks. This was really helpful. I plugged it into a vanilla jekyll site, added the search.min.js file, the plugin files, and it worked. Here's a sample working jekyll site in case anyone wants to download a working sample: sample jekyll site with lunr integrated.

@tomjoht tomjoht closed this as completed Jan 31, 2015
@tomjoht tomjoht reopened this Feb 1, 2015
@tomjoht
Copy link
Author

tomjoht commented Feb 1, 2015

For some reason I'm getting a warning about the version when I build jekyll: warning: already initialized constant Jekyll::LunrJsSearch::VERSION. Here's the full context of the error:

    johnson-mbpr13:resolvev3 tjohnson$ jekyll serve
Configuration file: /Users/tjohnson/projects/resolvev3/_config.yml
/Users/tjohnson/projects/resolvev3/_plugins/jekyll_lunr_js_search/version.rb:3: warning: already initialized constant Jekyll::LunrJsSearch::VERSION
/Users/tjohnson/.rvm/gems/ruby-2.0.0-p481/gems/jekyll-lunr-js-search-0.2.1/lib/jekyll_lunr_js_search/version.rb:3: warning: previous definition of VERSION was here
            Source: /Users/tjohnson/projects/resolvev3
       Destination: /Users/tjohnson/projects/resolvev3/_site
      Generating...
              Lunr: Creating search index...
              Lunr: Index ready (lunr.js v0.4.5)
                    done.
 Auto-regeneration: enabled for '/Users/tjohnson/projects/resolvev3'
Configuration file: /Users/tjohnson/projects/resolvev3/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

The site still builds, but I'd like to resolve this error. Can you help?

@samuel1208
Copy link

I found the sample code only worked locally with jekyll server command. when I upload the code to github. It can't work on github server. Did I do anything wrong

@slashdotdash
Copy link
Owner

@samuel1208 Jekyll plugins don't work in Github so you cannot use this plugin for GitHub pages, unless you also push up the locally generated search index.

@samuel1208
Copy link

@slashdotdash where should I push the search index to? Could you tell me how to config it ?

@samuel1208
Copy link

@slashdotdash Thanks for your advice. I push the search.index to github.page . It works now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants