wintersearch

Simple full-text search for Wintersmith

npm install wintersearch
4 downloads in the last week
10 downloads in the last month

wintersearch

wintersearch is a simple full-text search engine for wintersmith, a static website generator written for node.js.

Install

npm install -g wintersearch

Usage

To start, clone the GitHub repo or otherwise download the example. Then, from within the example folder, run

wintersearch preview

...and visit http://localhost:8000/search.html. You'll see a modified version of the wintersmith blog template and a functional instant search box.

To use wintersearch on a live webserver, run wintersearch from within your project folder to start the search engine (you'll probably want to use some kind of mechanism to ensure that it stays running constantly). In order to access the server from the web, configure a reverse proxy to wintersearch on port 3000. Here's an example for lighttpd:

$HTTP["url"] =~ "/search/" {
    proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 3000 ) ) )
}

The server only indexes content upon startup, so you'll need to restart it after making a change to the site content in order to index the new text. Also, it presently only looks at text in index.md files.

How it works

wintersearch preview launches the wintersmith preview server on port 8080, the wintersearch engine on port 3000, and starts a proxy server on port 8000. This allows you to test your wintersmith site and the wintersearch engine simultaneously. wintersearch just starts the wintersearch engine on port 3000.

Note: at the moment, these port numbers are hard-coded but these will configurable in the future.

wintersearch is made possible by a bunch of great projects:

npm loves you