Skip to content

Commit 12c5404

Browse files
committed
Merge pull request #209 from drewwells/patch-1
Fix issues with Disqus integration
2 parents e4df983 + 734ee1f commit 12c5404

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.themes/classic/source/_includes/disqus.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %}
22
{% if site.disqus_short_name and page.comments != false %}
33
<script type="text/javascript">
4-
(function () {
4+
55
var disqus_shortname = '{{ site.disqus_short_name }}';
66
{% if page.comments == true %}
77
{% comment %} `page.comments` can be only be set to true on pages/posts, so we embed the comments here. {% endcomment %}
88
// var disqus_developer = 1;
99
var disqus_identifier = '{{ site.url }}{{ page.url }}';
1010
var disqus_url = '{{ site.url }}{{ page.url }}';
11-
var disqus_script = 'embed.js'
11+
var disqus_script = 'embed.js';
1212
{% else %}
1313
{% comment %} As `page.comments` is empty, we must be on the index page. {% endcomment %}
14-
var disqus_script = 'count.js'
14+
var disqus_script = 'count.js';
1515
{% endif %}
16-
16+
(function () {
1717
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
1818
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
1919
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);

0 commit comments

Comments
 (0)