Adding Disqus to a Jekyll site


The easiest and cleanest way to do it is to create a partial with the HTML that disqus provides in your _includes/ folder (e.g. _includes/disqus.html) and then just including it in your posts layout file (e.g. _layouts/post.md):

---
layout: default
title:  "Adding Disqus to a Jekyll site"
date:   2018-01-01 17:00:00
categories: main
comments: True
---
{% if page.comments %}
  {% include disqus.html %}
{% endif %}