Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Update Readme #32

Merged
merged 1 commit into from
Apr 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ idea from this [blog post](https://alexpearce.me/2012/04/simple-jekyll-searching

```
---
layout: none
---
[
{% for post in site.posts %}
Expand Down Expand Up @@ -64,6 +63,21 @@ bower install simple-jekyll-search

You can customize several aspects of the plugin.

You need to place the following code within the layout where you want he search to appear.

For example in **_layouts/default.html**:

```
<!-- Html Elements for Search -->
<div id="search-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
</div>

<!-- Script pointing to jekyll-search.js -->
<script src="{{ site.baseurl }}/bower_components/simple-jekyll-search/dest/jekyll-search.js" type="text/javascript"></script>
```

The library exposes one method called `init`, to which you can pass your preferences in form of a Hashmap, like this:

```
Expand All @@ -73,6 +87,7 @@ SimpleJekyllSearch.init({
dataSource: '/search.json',
})
```
The above initialization needs to occur after the inclusion of `jekyll-search.js`.

### searchInput (Element) [required]

Expand Down