Adding disqus to jekyll pages
How to add disqus comment section to jekyll pages?
- Create an account in disqus
- While signing up choose “I want to install disqus on my site”
- Enter your website name, disqus uses this name to generate a “disqus short name”. This name is later used in configs.
- Select basic plan on Choose your plan page. This is a free subscription. Make sure you read and understand their terms.
- In the next section, select jekyll platform, this will take you to installation instructions.
- You should be presented with a code snippet like below
--- layout: default comments: true # other options ---
Add this under
_layouts/post.html
. For me this is where I load individual posts. - Installation instruction page should also give you
Universal Embed Code
. It should look something like this.
Copy above snippet to _layouts/post.html
. **Remember to change
- Click next and complete setup.
Generate your website in jekyll. You should now see disqus comments section in your post page.
Tip: If you need to disable comments for a single post, add comments: false
in the post.