Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(disqus):load comment bug #230

Merged
merged 2 commits into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions layout/_widget/disqus.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
queue.offer(function() {
var disqus_config = function () {
this.page.url = '<%- config.url + url_for(path) %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};

(function() { // DON'T EDIT BELOW THIS LINE
var d = document;
var s = d.createElement('script');
Expand Down
8 changes: 4 additions & 4 deletions layout/_widget/disqus_click.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
</script>

<script>
var disqus_config = function () {
this.page.url = '<%= page.permalink %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = '<%= page.permalink %>'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
$('.btn_click_load').click(function() { //click to load comments
var disqus_config = function () {
this.page.url = '<%- config.url + url_for(path) %>'; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document;
var s = d.createElement('script');
Expand Down