From 021423b9f5dfec4b58efa0bab31970f0b34fe599 Mon Sep 17 00:00:00 2001 From: Grayson Wright Date: Sat, 24 Sep 2016 06:59:26 -0700 Subject: [PATCH] Add Disqus for community comments on posts See: * https://disqus.com --- app/assets/javascripts/disqus.js | 21 +++++++++++++++++++++ app/views/posts/show.html.erb | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 app/assets/javascripts/disqus.js diff --git a/app/assets/javascripts/disqus.js b/app/assets/javascripts/disqus.js new file mode 100644 index 0000000..d452c5a --- /dev/null +++ b/app/assets/javascripts/disqus.js @@ -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); +})(); diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index e0ddf37..7e166e2 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -14,3 +14,7 @@ <%= link_to "Back", posts_path %> + +
+ +