enabling latent semantic indexing for octopress

For those that care about having related posts on their Octopress blog. It’s actually quite easy to turn it on, it’s nice to have and useful. But it’s not enabled by default in Octopress.

This feature already exists in jekyll, enabling this feature in Octopress is a trival task.

Firstly add this to your _config.yml file

lsi: true

Then create a file such as source/_includes/custom/asides/related.html with the following content, add it to one of your asides in _config.yml

{% raw %} Related Posts {% for post in site.related_posts limit:5 %} {{ post.title }} {% endfor %} {% endraw %}

It is possible to style the list, but in the above I have chosen to keep the same style as the recent posts.

Probable issues with enabling LSI

There are some issues with enabling LSI in jekyll/octopress, the primary issue will be performance. The default implementation will be slow if you have lots of posts to classify. It would be recommended that rb-gsl be installed to accelerate the classification process.

 Share!

 

See Also

comments powered by Disqus