Feb 04 2016 0

Update on Disqus comment counts

Yesterday I posted an article on how to add Disqus comment and noted I was hoping to find a tag to get the Disqus shortname. I haven’t found the correct tag/variable yet, but there is already a method to at least make the template dynamic.

Blot.im allows you to create global variables for your template. I created a variable named disqus_shortname and gave it the value of sharedmemorydump.

Global variablesGlobal variables

The line loading the Disqus count script in the template footer.html can now be updated from

<script id="dsq-count-scr" src="//sharedmemorydump.disqus.com/count.js" async></script>

into

<script id="dsq-count-scr" src="//{{disqus_shortname}}.disqus.com/count.js" async></script>

making it more dynamic.


Previous post
Adding Disqus comment counts to Entries template On the entries page I wanted to be able to show the number of comments each post has. Disqus provides functionality for this purpose.
Next post
Using Xcode Server 7.2.1 Setting up Xcode Server with Xcode version 7.2.1 was troublesome to say the least. With a bit of Googling I got the following three issues resolved
This blog is powered by Blot