Skip to content

Commit 23c3c64

Browse files
authored
Merge pull request #2 from felixnie/bugfix/fix-disqus
Let /path/ and /path point to the same page
2 parents 7519e01 + 5323c16 commit 23c3c64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_includes/my-comments.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
config() {
2323
this.page.url = w.location.href;
2424
this.page.title = d.title;
25-
this.page.identifier = w.location.pathname;
25+
this.page.identifier = w.location.pathname.replace(/\/$/,'');
2626
},
2727
});
2828
} else {
2929
w.disqus_config = function disqusConfig() {
3030
this.page.url = w.location.href;
3131
this.page.title = d.title;
32-
this.page.identifier = w.location.pathname;
32+
this.page.identifier = w.location.pathname.replace(/\/$/,'');
3333
};
3434
w.loadJSDeferred(d.getElementById("_hrefDisqus").href + 'embed.js');
3535
}
@@ -43,7 +43,7 @@
4343
config: function () {
4444
this.page.url = w.location.href;
4545
this.page.title = d.title;
46-
this.page.identifier = w.location.pathname;
46+
this.page.identifier = w.location.pathname.replace(/\/$/,'');
4747
}
4848
});
4949
}

0 commit comments

Comments
 (0)