Implementing the HashOver open source commenting system within Pelican

My last post referenced a new open source commenting system called HashOver.

I decided I would create a very simple tutorial to show users how quickly you can set HashOver up on your server and integrate it with Pelican.

If you are not familiar with it, Pelican is an excellent Python-powered static website generator which powers this website and many others.


Note: This article was updated to point to the development build of HashOver 2.0 as the original version does not recieve updates.


Getting started

  1. Download HashOver
  2. Extract and upload the contents to your website's top level directory (e.g, http://example.com/hashover).
  3. Edit the hashover/scripts/settings.php file to set up your administrative credentials and adjust settings to your personal preferences.

It is very important that you do not skip setting up your credentials.

Additional Information

If for some strange reason you find that your comments are not saving, you may need to adjust the ownership and/or permissions on the hashover/pages directory.

You should never set the permissions to 0777 if you can help it. Instead, change the ownership of the directory to the web server's user account (apache, nginx, etc) and then ensure that the directory's permissions is set to 0755.

Edit Pelican's template

Edit your Pelican theme's article.html file and add the following directly above {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}:

{% if SITEURL and article.status != "draft" %}
<div class="comments">
  <h2>Comments?</h2>
  <script type="text/javascript" src="/hashover/hashover.js"></script>
  <noscript>Please enable JavaScript to view the comments.</noscript>
</div>
{% endif %}

Regenerate your website with make html and upload the changes. You should now see HashOver on your articles.

Comments?

recommended sites

social