GaeBlogX Arista Networks, Software-Defined Networking

SimpleBlogSearch


SimpleBlogSearch

A small library that does searching in your static blog contents. In theory should work with any blog generator like Jekyll and Hexo as long as it generates data for all of your blog posts.

This is motivated by hexo-theme-freemind, and Simple-Jekyll-Search. The hexo one is just too buggy and lacks features I want, so I end up rewriting it to fit my needs. The codes currently are very simple and don’t support as many features as Simple-Jekyll-Search, so I think the best thing to do is to have Simple-Jekyll-Search integrate the functionalities that are useful.

Features

Installation

npm install simpleblogsearch

Demo

See my own blog.

Usage

Add the following script to your html file (change parameters accordingly):

<script>
SimpleBlogSearch({
   searchDataPath: '/assets/search_data.json',
   dataType: 'json',
   processDataFunc: function(data){ return data },
   searchInputID: 'search_box',
   resultsDivID: 'search_results',
   resultULClass: 'content-ul search-ul content-side',
   highlightKeywordClass: 'search_keyword',
   limit: 4,

});
</script>

See my own theme as an example.

Search
Content