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

Instructions could use some more detail #62

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

Instructions could use some more detail #62

tomjoht opened this issue Jan 31, 2015 · 5 comments

Comments

@tomjoht
Copy link

tomjoht commented Jan 31, 2015

I'm somewhat new to Jekyll and had trouble with the instructions. I think it would be better to clearly separate out the content into three distinct sections:

  • Installing lunr search using the pre-built plugin method
  • Installing lunr search using the rubygem method
  • Building the plugin for development purposes

Some other questions I had:

  • why wouldn't I want to use simple.min.js instead of integrating all the libraries directly? the instructions seemed to minimize that option, adding it almost as a footnote.
  • what is a search nominated page? can i just integrate it into the header of my default layout?
  • where does the mustache template go?
  • is jquery.lunr.search.js included in simple.min.js or separate?

I would be happy to help revise the instructions to make them clearer, especially providing an instruction from a viewpoint of someone who is more new to Jekyll, but I can't get the plugin working myself. Can you help me?

@ccsastro
Copy link

ccsastro commented May 6, 2015

Yes, where does the mustache template go?

@dstroot
Copy link

dstroot commented Jun 14, 2015

++1

"Place build/jekyll_lunr_js_search.rb inside the _plugins folder in the root of your Jekyll site"

umm... where is the "build" directory???? I searched my system and cannot find it.

In _plugins Am I putting a link there? Am I coping the file there?

@tomjoht
Copy link
Author

tomjoht commented Jun 14, 2015

There are new instructions for using this plugin on jekyll.tips. I haven't tried them out yet, though.

Sent from my iPhone

On Jun 14, 2015, at 10:46 AM, Dan Stroot [email protected] wrote:

++1

"Place build/jekyll_lunr_js_search.rb inside the _plugins folder in the root of your Jekyll site"

umm... where is the "build" directory???? I searched my system and cannot find it. Am I putting a link there? Am I coping the file there?


Reply to this email directly or view it on GitHub.

@dagoss
Copy link

dagoss commented Aug 17, 2015

"Place build/jekyll_lunr_js_search.rb inside the _plugins folder in the root of your Jekyll site"

I think this is referring to build/jekyll_lunr_js_search.rb in this repo, however, I'm not sure why you would want to install it this way instead of using the gem. This project has some other ruby dependencies, so there probably needs to be a disclaimer about needing them, or else installing locally in your _plugins dir won't work.

@soulpimp
Copy link

soulpimp commented Apr 20, 2016

@ccsastro drop the mustache template inside the search-results element.
I created an _include called search.html, dropped this inside it and the form code, then added an <% include search.html %> tag in my default.html template (global search), where I wanted my search box to be displayed.

<section id="search-results" style="display: none;"> 
    {% raw %}
        <script id="search-results-template" type="text/mustache">
            {{#entries}}
                <article>
                    <h3>
                        {{#date}}<small><time datetime="{{pubdate}}" pubdate>{{displaydate}}</time></small>{{/date}}
                        <a href="{{url}}">{{title}}</a>
                    </h3>
                    {{#is_post}}
                        <ul>
                            {{#tags}}<li>{{.}} </li>{{/tags}}
                        </ul>
                    {{/is_post}}
                </article>
            {{/entries}}
        </script>
    {% endraw %}
</section>

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

5 participants