Skip to content

A very simple setup to index a Jekyll site and make it searchable. The search index can then ve accessed via a node proxy.

Notifications You must be signed in to change notification settings

RobinThrift/Jekyll---elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ever wanted to make your Jekyll site searchable? Well, now you can!

Using the power of elasticsearch and Node!

For more info on this, and to find out how to set it up, read this blog post: Making Jekyll searchable with elasticearch;

In this repository you will find a little Jekyll template that will render a JSON file that is easily parsable and contains all the relevant information. This JSON file will then be used by indexer.js to index your site via the elasticsearch API. If you only changed a file, it will update the entry and not create a new one, preventing duplicate entries. See indexer.js for more info on how it works.

Then start search_server.js to act as a proxy between the client and elasticsearch. Make sure to add Header set Access-Control-Allow-Origin "domain:port" to your .htaccess.

Every time you update your Jekyll blog you will have to run node indexer.js in order to update the index.

In order to use the scripts, add your INDEX and TYPE to indexer.js and search_server.js. You will also have to edit the Access-Control-Allow-Origin in search_server.js to allow your client side code to access the proxy.

About

A very simple setup to index a Jekyll site and make it searchable. The search index can then ve accessed via a node proxy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published