Please note that this version of the site is no longer being updated. All content has been merged with my IT Blog "Much Ado About IT". Click here to see this page on the other site. I've found that using Jekyll to be too fragile and complex. GitHub pages are too limited. The blog site was on WordPress (self-hosted) but that was too slow and clunky. The revamped blog now uses Hugo and is published using Netlify
Add Disqus to Jekyll pages
Create footer.html
in your site _includes
folder or include this in the default layout in _layouts
.
{% if page.comments %}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}'
this.page.identifier = '{{ page.id }}'
};
(function() { var d = document, s = d.createElement('script');
s.src = 'https://<<set_this_from_disqus_settings>>.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>
{% endif %}
<div>Updated: {{ page.date | default: site.time | date: "%Y-%m-%d %H:%M" }} <a href="#top">Top</a></div>
Note that the default minima
theme for Jekyll/GitHub pages includes a setting for this in _config.yml but currently does not include the appropriate include file to let you use it!
Also note that you have very little control over the styling. In particular, the width is set to 100% so make sure that this code is wrapped in a div that is limited to your normal content width.