Tapir search for your Octopress blog!
Tapir works by indexing your RSS feed. Only what is included within this file will be indexed. For RSS purposes you most likely only want the last 20 or so articles but for search, you want all of them included. To handle this, we simply create a second xml file to use for search.
atom.xml
- the original file
- limited to 20 most recent posts
- we use this for RSS
atom_search.xml
- the new file
- a modified version of atom.xml
- includes all posts
- added summary field
##Install
- Visit Tapirgo.com and enter the url to your atom_search.xml like:
http://yoursite.com/atom_search.xml
After you enter your email and click the big GO button, you'll be given both a public and a private token. - Open your
_config.yml
and include the public token:tapir_token: your_id_here
- Copy
loading.gif
to yoursource/images/
folder. - Copy
jquery-tapir.js
to yoursource/javascripts/
folder. - Copy
search.html
to yoursource/
folder. - Open
source/_includes/navigation.html
and add:
{% if site.tapir_token %}
<form method="get" action="{{ root_url }}/search.html">
<fieldset role="search">
<input class="search" name="query" type="text" placeholder="Search..." x-webkit-speech />
</fieldset>
</form>
{% endif %}
That's all there is to it. You should now be able to search your content using the wonderful Tapir service. :)
##Author
Gary Traffanstedt ([email protected])
based on the wonderful work of Pankaj Kumar ([email protected]) and his Fabric Theme for Octopress.