1 min read

Setting up Commento.io to Add Clean Commenting Functionality On Your Ghost Website

Setting up a simple, clutter-free commenting feature in your self-hosted Ghost blog.
Setting up Commento.io to Add Clean Commenting Functionality On Your Ghost Website

Note: this is an inflight post to document what I've done today. I hope to refine this in future.

Ghost is a spectacular piece of software. It only focuses on doing one thing great, publishing and makes the entire process seamless. Staying true to it's minimalism, it hasn't added native commenting facility, even though they implemented more complex features such as memberships and newsletters.

For those looking to add commenting on their Ghost blog, Disqus has been a good option. It's easy to integrate but has too much clutter and has been increasingly less privacy focused. There is also utterenc.es, which integrates the commenting facility of Github Issues into the blog. However, in my opinion, Commento.io fits best with the clean minimalism of Ghost. I saw it implemented Kifah Meeran's blog last year and instantly wanted to implement here. But I never got around to doing it. Until now.

Thankfully, a docker-compose based implementation together with traefik was already well documented. The docker-compose.yml file provided in the docs is a great starting point and work out of the box. If you've configured traefik before, using label based configuration will get you up and running very quickly.

I also wanted to add comments by connecting to identity providers such as Google and Twitter which is just a matter of configuring some environment variables. I couldn't get Twitter login working because I'm still waiting for a Twitter Developer Account to be approved.

The majority of the work is just adding configuration for traefik and getting and setting OAuth credentials.

In the Ghost template itself, if you have a theme that uses a comment partial, then it's just a matter of replacing two simple HTML tags in it. Otherwise, just add the comment div and javascript tag in the post.hbs file in the relevant section of the page and re-upload the theme and it works magically.

Some interesting stuff that you have to worry about is spam comments which is solved by Akismet by obtained a key.