localsearch
Create data files for local search via Tipue
To install, run nikola plugin -i localsearch
If you don't want to depend on Google or DuckDuckGo to implement search for you, or just want it to work even if you are offline, enable this plugin and the search will be performed client side. It uses Tipue Search as its engine.
In ordrer to set up Tipue, you will need:
- the sample config from
conf.py.sample
and a page set up to renderlocalsearch.tmpl
(which you may customize) — an example is insearch-EXAMPLE.html
- or the alternate sample config from
conf.py.sample.alt
, which uses a modal and does not need another page - jQuery on the search page; you might need to modify the templates if your theme doesn’t already include it
For more information about how to customize it and use it, please refer to the Tipue Search docs.
Tipue is under an MIT license (see MIT-LICENSE.txt)
Suggested Configuration:
# This is an example that works well with Nikola's default Bootstrap3 theme. # It displays the search field in the navigation bar, and the results # on a separate page (which needs to be configured, see README.md). # This snippet assumes the page ends up at /search/. SEARCH_FORM = """ <form class="navbar-form navbar-left" action="/search/" role="search"> <div class="form-group"> <input type="text" class="form-control" id="tipue_search_input" name="q" placeholder="Search" autocomplete="off"> </div> <button type="submit" class="btn btn-default">Submit</button> </form> """ EXTRA_HEAD_DATA = """ <link rel="stylesheet" type="text/css" href="/assets/css/tipuesearch.css"> """
Issues? Questions?
You can report issues with this plugin and request help via GitHub Issues.