• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Ruby
  • Created over 13 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Jekyll + indextank = Static websites with powerful full-text search

Jekyll + indextank = Static websites with powerful full-text search

How to use:

  • Place jekyll_indextank.rb inside the _plugins folder in the root of your jekyll site.
  • Add 'indextank_index', 'indextank_api_url' and optionally 'indextank_excludes' settings to your _config.yml

All pages' main content will be indexed at indextank, now all you have to do is hook up some Javascript and ajax to a form to query the indextank api.
Note that, while at the time of writing, the indextank api docs do not show that the search api supports jsonp, it does. Just add &callback=mycallback to the api call.

How it works

Everytime you generate your Jekyll site, all pages will be indexed at IndexTank. Now when you query the IndexTank search api, something like this will be returned:

{"matches": 1, "facets": {}, "search_time": "0.002", "results": [{"docid": "/blog/2009/01/04/colored-uiprogressview.html"}]}

The "docid" field contains the absolute url (minus domain name) to the matched resource.

JavaScript usage example

$.getJSON("http://<your_api_key>.api.indextank.com/v1/indexes/<your_index>/search?q=<a query>&callback=?", function(json) {
	alert(json.results); //you might want to approve usability a bit ;-)
});

See examples/example.html for a basic example, showing results in a div.

For a live example see the search on my blog http://pwiddershoven.nl

Requirements

Jekyll_indextank requires the following gems:

  • indextank
  • nokogiri

For an example of available config settings, see example_config.yml.

Installation

  • gem install indextank nokogiri
  • rake build
  • copy build/jekyll_indextank.rb to your hyde site's _plugins folder

More Repositories

1

kindle-dash

Power efficient dashboard for Kindle 4 NT devices
Shell
1,212
star
2

dashbling

Hackable React based dashboards for developers, inspired by Dashing.
TypeScript
469
star
3

Airplayer

Python script to make media playing software Apple Airplay compatbible. Currently supports XBMC, Plex and Boxee.
Python
333
star
4

PDColoredProgressview

A UIProgressview subclass with support for setting a tint color instead of the boring default blue.
Objective-C
152
star
5

django-webpack-boilerplate

Django + Webpack without glue plugins
Python
77
star
6

pragma

Pragma is a self-hosted, open-source, personal note taking app.
OCaml
42
star
7

go-alfred

Utility library for creating lightning fast Alfred 2 workflows
Go
26
star
8

pragma-rest-client

Pragma, the pragmatic visual HTTP/REST client
JavaScript
18
star
9

remarkable-wifi-conf

Utility to configure WiFi on the Remarkable paper tablet via the CLI. For WiFi networks with password characters unsupported by the Remarkable software keyboard.
Python
6
star
10

11ty-boilerplate

11ty boilerplate with Webpack, Sass and Babel
JavaScript
4
star
11

PWFakeWeb

Stub out HTTP requests for testing HTTP related Objective-C code.
Objective-C
4
star
12

remark-js-livereload-boilerplate

Remark.js + livereload boilerplate
HTML
2
star
13

java-boot-demo

Java
1
star
14

jFactory

jFactory - easy object factories for Java
Java
1
star
15

docker-varnish-alpine-mods

Docker image for Varnish based on Alpine Linux, includes vmods
Dockerfile
1
star
16

nextcloud-on-this-day

Nextcloud photo stream of photos on this day in the past
Crystal
1
star
17

liveview-dashboard

Elixir
1
star
18

advent-of-code

OCaml
1
star