Skip to content

Commit e07a477

Browse files
authored
Update disqus.htm
1 parent 771616d commit e07a477

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

_includes/disqus.htm

+30-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1-
<div id="disqus_thread"></div>
2-
<script>
3-
/**
4-
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
5-
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
6-
/*
7-
var disqus_config = function () {
8-
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
9-
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
10-
};
11-
*/
12-
(function() { // DON'T EDIT BELOW THIS LINE
13-
var d = document, s = d.createElement('script');
14-
s.src = 'https://soarespaullo.disqus.com/embed.js';
15-
s.setAttribute('data-timestamp', +new Date());
16-
(d.head || d.body).appendChild(s);
17-
})();
18-
</script>
19-
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
1+
<!-- Disqus comments section goes here (if comments are enabled) -->
2+
{% if page.comments == true and jekyll.environment == "production" %}
3+
4+
<div class="comments">
5+
<div id="disqus_thread"></div>
6+
7+
<script type="text/javascript">
8+
9+
/* * * STOP! * * */
10+
/* You shouldn't need to edit ANYTHING below to get this working! */
11+
/* Instead, edit the key `disqus.shortname` in _config.yml */
12+
13+
var disqus_config = function (){
14+
this.page.url = '{{ page.url | absolute_url }}';
15+
this.page.identifier = '{{ page.url }}';
16+
};
17+
18+
(function() {
19+
var d = document, s = d.createElement('script');
20+
s.type = 'text/javascript'; s.async = true;
21+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
22+
s.setAttribute('data-timestamp', +new Date());
23+
(d.head || d.body).appendChild(s);
24+
})();
25+
26+
</script>
27+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
28+
</div>
29+
30+
{% endif %}

0 commit comments

Comments
 (0)