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

Monospace theme lacks javascript required to display Disqus comments #232

Closed
tompollard opened this issue Jul 2, 2014 · 0 comments · Fixed by #233
Closed

Monospace theme lacks javascript required to display Disqus comments #232

tompollard opened this issue Jul 2, 2014 · 0 comments · Fixed by #233

Comments

@tompollard
Copy link
Contributor

The Monospace theme will not load Disqus comments because it is lacking the necessary javascript.

The setup instructions for installing Disqus are listed at:
https://disqus.com/admin/universalcode/

The Monospace theme has a disqus_script include at:
https://github.com/getpelican/pelican-themes/blob/master/monospace/templates/disqus_script.html

This script counts the number of comments, but does not include the chunk of javascript required to render the comments box.

To display the Disqus comments box, the following chunk needs to be included in the article.html template at https://github.com/getpelican/pelican-themes/blob/master/monospace/templates/article.html

    <div id="disqus_thread"></div>
    <script type="text/javascript">
        var disqus_shortname = '{{DISQUS_SITENAME}}';
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant