mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Improve Disqus embed code in notmyidea theme
According to Disqus, the disqus_shortname variable is a required field. Also added a <noscript> notice for those who have JS disabled.
This commit is contained in:
parent
4a940da1a2
commit
5e5510cfcf
13 changed files with 53 additions and 27 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<header>
|
||||
<h1 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
|
||||
title="Permalink to {{ article.title|striptags }}">{{ article.title}}</a></h1>
|
||||
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
|
||||
{% include 'twitter.html' %}
|
||||
</header>
|
||||
|
||||
|
|
@ -19,14 +19,16 @@
|
|||
<h2>Comments !</h2>
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_identifier = "{{ article.url }}";
|
||||
var disqus_url = "{{ SITEURL }}/{{ article.url }}";
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
||||
var disqus_identifier = '{{ article.url }}';
|
||||
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the comments.</noscript>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue