diff options
Diffstat (limited to 'Just-Read/templates')
-rw-r--r-- | Just-Read/templates/article.html | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/Just-Read/templates/article.html b/Just-Read/templates/article.html index 1539b78..038eb3b 100644 --- a/Just-Read/templates/article.html +++ b/Just-Read/templates/article.html @@ -6,25 +6,31 @@ <div class="post wrapper"> <h1>{{ article.title }}</h1> {{ article.content }} - + <a href="https://twitter.com/share" class="twitter-share-button" data-via="{{ TWITTER_USERNAME }}" data-lang="en" data-size="large" data-related="{{ TWITTER_USERNAME }}">Tweet</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> {% if DISQUS_SITENAME %} <div class="comments"> - <h2>Comments !</h2> - <div id="disqus_thread"></div> - <script type="text/javascript"> - var disqus_identifier = "{{ article.url }}"; - (function() { - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); - </script> + <h2>Comments !</h2> + <div id="disqus_thread"></div> + <script> + var disqus_config = function () { + this.page.url = "{{ SITEURL }}/{{ article.url }}"; + this.page.identifier = "{{ article.slug }}"; + this.page.title = "{{ article.title }}"; + }; + (function() { + var d = document, + s = d.createElement('script'); + s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> - {% endif %} + {% endif %} </div> - {% include 'metadata.html' %} </article> </div> |