Refactored inclusion of disqus script
- Added ARIA setting `aria-live="polite"` to comment output - Removed duplicate <div id="disqus_thread"> from page/post templates - Moved blocking JavaScript loading to the end of the document body. - Merged JavaScript code for index and pages/posts using conditionals - Moved global JavaScript disqus variables into the anonymous function to stop pollution of global namespace
This commit is contained in:
@ -17,10 +17,10 @@ single: true
|
||||
{% endunless %}
|
||||
</footer>
|
||||
</article>
|
||||
{% if site.disqus_short_name and page.comments != false %}
|
||||
{% if site.disqus_short_name and page.comments == true %}
|
||||
<section>
|
||||
<h1>Comments</h1>
|
||||
<div id="disqus_thread">{% include post/disqus_thread.html %}</div>
|
||||
<div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user