How to Add Disqus Comments to Your Ghost Blog

But the good news is you can use other third party commenting systems to your ghost blog like Disqus, Google+, Facebook and more.
In this tutorial you will learn how to add Disqus commenting system to Ghost blog.
How to add Disqus Commenting to Ghost
About Disqus
Disqus is a blog comment hosting service for Web sites and online communities like blogs. Disqus is very popular among most of the bloggers and many blogs use it.
First you will need a free Disqus account. Go ahead and register your new Ghost site while you're there. Note down Disqus shortname is; you'll need it later.
First you will need a free Disqus account. Go ahead and register your new Ghost site while you're there. Note down Disqus shortname is; you'll need it later.
Follow below steps to add Disqus to your Ghost blog
Open your post.hbs file and look for
{{/post}}
. Place the following code just after that,but before </article>
:<div style="clear:both;"></div> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = 'example'; // required: replace example with your disqus shortname var disqus_identifier = '{{post.id}}'; // make sure to use the post.id as an identifier, otherwise disqus will use the pages url per default, which might no work sometimes... /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a> or upgrade your browser.</noscript> <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
Make sure you replace example with your shortname in
var disqus_shortname = 'example';
line.Done: Now you have successfully installed disqus commenting on your Ghost blog.
Comments
Post a Comment