Adding Disqus comments to Ghost blog on Azure
| Petru Rebeja
If you have a Ghost hosted on Azure (like I did) then you may want to add Disqus comments to it (like I did).
To do so, follow the steps below:
- Create a Disqus account if you haven't done so already.
- Login to Disqus and navigate to the admin page.
- Click on Install Disqus and choose Ghost from the list.
- Open a new tab and navigate to Azure portal and from the dashboard open/navigate to the application hosting your Ghost blog.
- On the application blade select
App Service Editor
and pressGo->
to open the editor for your blog. - In the editor navigate to
wwwroot\content\themes\<your-theme>\post.hbs
. This will load the file in the panel on the right. - Go back to Ghost Install Instructions on Disqus and copy the Universal Embed Code.
- Paste the code into post.hbs file in the place where you want your comment section to be.
-
Find the section to define configuration variables and make it look like this:
var disqus_config = function () { this.page.url = '{{@blog.url}}{{url}}'; this.page.identifier = '{{id}}'; };
Happy blogging!
Comments
Comments powered by Disqus