Skip to content

Commit

Permalink
Add Disqus for community comments on posts
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lliope committed Sep 24, 2016
1 parent c73f478 commit 021423b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions app/assets/javascripts/disqus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* RECOMMENDED CONFIGURATION VARIABLES:
* EDIT AND UNCOMMENT THE SECTION BELOW
* TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT:
* https://disqus.com/admin/universalcode/#configuration-variables
*/

/*
var disqus_config = function () {
this.page.url = PAGE_URL; // 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, s = d.createElement('script');
s.src = '//the-self-destructing-blog.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
4 changes: 4 additions & 0 deletions app/views/posts/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
</div>

<%= link_to "Back", posts_path %>

<div id="disqus_thread">
<noscript>Please enable JavaScript to view the comments.</noscript>
</div>

0 comments on commit 021423b

Please sign in to comment.