How do I use disqus comments in github pages blog (Markdown)?

Jon picture Jon · Jan 30, 2014 · Viewed 16.3k times · Source

Is it possible to integrate disqus html comments in a blog using github-pages? I like the idea of using github, jekyll and markdown to manage my site and blog for simplicity. However, I'd like to include disqus commenting capability. However, since markdown generates the html - how do I include the html/js code for disqus ?

Answer

andersonvom picture andersonvom · Mar 5, 2014

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):

{% include disqus.html %}

You can see an example here: post layout and disqus partial.