Now we have a running Ghost on AWS!. It's alive but something is missing. We need a way to receive some feedback from our readers. Ghost does not have an out of the box solution for commenting. I don't like this part of the Ghost but it is what it is :-)

Commenting with Commento

I looked at many commenting options such as Disqus, Isso and Utterances. Disqus is slow, clunky and it has some privacy concerns. Isso and Uttrerrances are promissing and I almost got one of those until I discovered Commento. It is open source and comes with features like OAuth, Spam filtering and voting. Best of all, it does not haunt the readers with some random advertisements (Disqus, cough cough). Commento comes with self hosted and SaaS variants. We will go ahead wtih SaaS for now to keep it simple.

I could find few places that explain how to integrate comments into Ghost installations on an Ubuntu server. I tried that but wanted something that works with containers. I tried to make my own Ghost docker image, tried to use Ghost containers in Ubuntu server containers etc. Finally Ghost custom theams became the ideal solution. We can customaize an existing theme, deploy and test locally. Once we are happy, we can import it to our production environment. Below are the steps to follow.

Changes on Ghost theme

  1. Setup local Ghost development environment by follwoing the documentation
    Screen-Shot-2020-03-24-at-9.14.52-am-1
  2. Log in to production setup as admin and download existing theme
    Screen-Shot-2020-03-24-at-9.22.11-am
  3. Unzip the downloaded theme file into {Local Ghost Root}/content/themes/ folder
  4. Get yarn installed with brew install yarn
  5. Get gulp installed with brew cask install gulp
  6. Add gulp to yarn with yarn global add gulp-cli
  7. Make sure you have the local ghost up and running with ghost start
  8. Update post.hbs as shown below to integrate with commento
    Screen-Shot-2020-03-24-at-1.54.00-pm
  9. Build files locally with gulp and verify the changes. The zip file is saved in the dist folder
    Screen-Shot-2020-03-24-at-2.04.51-pm
  10. Run compatibility test against our version of Ghost with yarn test
    Screen-Shot-2020-03-24-at-3.04.44-pm
    As per the ghost doc we can safely ignore the warnings.
  11. Import the zip file into production
    Screen-Shot-2020-03-24-at-2.11.06-pm

Changes on Commento

This is the easiest step. Just go to https://commento.io/. Create an account and register the domain. That's it!

Comments with OAuth

Commento SaaS version is very easy to integrate but there is a catch. We can't export any comments. So we have to get the self hosted option up and running, sooner than later.

Until next time!