Running Jekyll with Latent Semantic Indexing (or LSI) on a site of only 20-30 pages can take 5-10 minutes on a reasonably powerful Mac. I got tired of having to wait or isolate individual posts to get on with writing, so I took Jekyll’s recommendation and installed the GNU Scientific Library (or GSL).
After properly installing GSL on my MacBook Pro, building my site went from over 5 minutes for a site with about 100 posts, to under 5 seconds.
Install GSL via homebrew:
$ brew install gsl
If you don’t already have a Gemfile
for your Jekyll site, create one that looks similar to this:
source 'https://rubygems.org'
gem 'jekyll'
gem 'gsl'
Note: If you already have a Gemfile, the important lines are
narray
andgsl
. Be sure to include the git repository links, as these contain my fixes to compile on OS X 10.9 “Mavericks”.
Now use Bundler to install the dependencies on your Mac:
$ cd {YOUR SITE'S FOLDER}
$ bundle install
Note: It’s probably worth while looking into a tool like RVM, rbenv or similar that will let you create gemsets so that you don’t pollute the system rubygems unnecessarily.
Now start up Jekyll and activate LSI (add --watch
if you want to rebuild on any change to your content):
$ jekyll serve --lsi
Make yourself a coffee with all the extra time you’re going to save not sitting around waiting for the LSI indexer to finish!
Et voilà! Super speedy site rebuilds with more intelligent related posts for each page.