Skip to content
Fabio Mucciante edited this page Feb 25, 2023 · 8 revisions

Welcome to the Jekyll-Disqus wiki!

Jekyll-Disqus is a small plugin for Jekyll that provides the tags to embed the Disqus code and display a comment counter or the user interface used to insert the comments.

In practice, each of them consists of an HTML code that must be placed in the same place we want to see these elements rendered, and a Javascript code that should go, together with other Javascript codes, at the bottom of the page, before the body tag is closed.

To associate a comment thread with every post, an identifier must be associated, this identifier must also be unique, otherwise, the same comments might appear on two different pages.

What this script does is generate a unique ID starting from the publishing date, automatically. When it is not provided (i.e. on pages or collections), a disqus_id can be manually assigned in the front matter.

In addition, it also ensures that every ID is really unique and that every post or page that should provide an ID to that script, it really does that!

That is the main difference between this plugin and whatever portion of the Liquid template that can be included as a part of the theme.

Installation

Just like other Jekyll plugins, it can be installed by including the gem name in the :jekyll_plugins group inside the Gemfile file:

group :jekyll_plugins do
  ...
  gem 'jekyll-disqus'
end

Then use bundler from the terminal to download it and bundle to the project:

$ bundle install

Configuration

The configurations to set up in the _config.yml file are very minimal and go under the jekyll_disqus key:

jekyll_disqus:
  

Tags

Clone this wiki locally