Jayanath Amaranayake
Few More Words

Few More Words

Deploy Ghost on AWS using CloudFormation - Part 05

Deploy Ghost on AWS using CloudFormation - Part 05

Integrate Commento SaaS

Jayanath Amaranayake's photo
Jayanath Amaranayake
ยทMar 29, 2020ยท

2 min read

Subscribe to my newsletter and never miss my upcoming articles

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.. ๐Ÿคท

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 promising 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 with 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 themes became the ideal solution. We can customise 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 following the documentation commento-1.png
  2. Log in to production setup as admin and download existing theme commento-2.png
  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 commento-3.png
  9. Build files locally with gulp and verify the changes. The zip file is saved in the dist folder commento-4.png
  10. Run compatibility test against our version of Ghost with yarn test commento-5.png ๐Ÿ“Œ As per the ghost doc we can safely ignore the warnings
  11. Import the zip file into production commento-6.png

Changes on Commento

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

commento-7.png
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! ๐Ÿ‘‹

ย 
Share this