SEARCHABLE
Both keyup and url parameter search.
Search is performed on every field keyup
event, via ajax calling of search.json
file where target fields are collected for every post:
Search results div is populated by template
setting variabile in assets/js/simpleJekyllSearch.js
which is now set like _includes/archive-item.html
.
You can pass query string to search page as url parameter so you can careate filter links like /search/?string=specific-tag
or /search/?string=genuary 2014
.
Customize search
- If you need to restrict search on custom post fields just add them in post front-matter:
-
Add in
pages/search.json
a call"customkey" : "{{ post.customkey }}"
-
You can show custom keys on search results tweaking
template
var inassets/js/simpleJekyllSearch.js
using{customkey}
.