Add disqus comments and search functionality to your ghost blog
I have been meaning to add commenting functionality to this blog for a while because I am really interested in hearing feedback from readers on what they like and what can be improved. Adding disqus commenting facility to my site had been on the to do list for a while and I finally tackled it today. It was much quicker and easier to setup than I had expected and primarily just required setting up some configuration options. I have also changed the theme for the site to Attila which I came across reading another blog last night. The theme itself introduced me to the client-side search functionality via ghostHunter.
Detailed and clear setup instructions are provided in the links above so I'm not going to repeat them here but I will lay down high level steps that you will be able to follow:
- Setup a disqus account and make note of your disqus short name that we will require for configuration.
- Via the ghost integrations > custom intergrations, create a new custom integration called ghostHunter and copy the Content API Key
- Clone the attila theme repository for GitHub from command line and cd into the directory /assets
- Clone the ghostHunter repository as mentioned in the setup on the ghostHunter GitHub readme page.
- Zip the resulting attila theme folder and upload it via Ghost Admin web interface under the Design section. Activate the theme.
- Go to the Code integrations page an copy and paste the
script
tags mentioned in the attila GitHub repository readme in the Ghost Blog Header section. Add the disqus short name and Content API Key from earlier steps as relevant. Save changes. - Go to your blog home page. You will notice the search icon on the top right. Play with the search functionality to make sure it works. Navigate to one of the pages and go to the bottom of the page and verify that you have disqus section visible. Click the 'Show Comments' button to see that comment input form appears.
That's it. Everything should be working correctly. The whole setup will take 15 to 30 mins. I setup all this and wrote this blog post within my 1 hour train ride.