For those running Octopress and wanting to set up a full-text search of their site, something a little nicer than the stock Google Simple Search, Tapir is a valid option. It’s a third party website that indexes your RSS feed and provides search tools against that data-set.
Note: You can find the relevant files on GitHub here: octopress-tapir
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.
- the original file
- limited to 20 most recent posts
- we use this for RSS
- 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 your source/images/
folder. - Copy
jquery-tapir.js
to your source/javascripts/
folder. - Copy
search.html
to your source/
folder. - Open
source/_includes/navigation.html
and add:
1
2
3
4
5
6
7
8
9 | {% if site.tapir_token %}
<form method="get" action="/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. :)