Skip to content

Commit

Permalink
Add disqus page identifier
Browse files Browse the repository at this point in the history
Hopefully this improves reliability of disqus comments, but could
potentially break existing comments.
  • Loading branch information
scotte committed Dec 24, 2015
1 parent a780a9f commit b678a5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _includes/disqus-comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus }}';

var disqus_config = function () {
this.page.identifier = '{{ page.url | slugify }}';
};

(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
Expand Down
4 changes: 4 additions & 0 deletions _includes/disqus-counts.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus }}';

var disqus_config = function () {
this.page.identifier = '{{ page.url | slugify }}';
};

(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
Expand Down

0 comments on commit b678a5f

Please sign in to comment.