Adding discus commenting system and customize themes on netlify cms

304 Views Asked by At

Recently I buy a domain and hosting from netlify , I added netlify cms with default themes minima , now I want to add discus comment system .

Here is the example of short code for enabling discus comment system

disqus:
shortname: my_disqus_shortname

I got my short name, just where I put the code ?

Secondly I want to change/customize themes based on custom themes

1

There are 1 best solutions below

0
On

The code should be added to the layout theme file. You should override it by creating a post.html in the '_layout' folder in the root of your project. Customization should also be done by overriding these theme files.

However, minima has native Disqus support. The include file can be found here: https://github.com/jekyll/minima/blob/master/_includes/disqus_comments.html. In this file, you see that the variable site.disqus.shortname is referenced. This variable should be in _config.yml, like this:

disqus:
  shortname: yourshortname

PS. I would choose: https://jekyllcodex.org/blog/gdpr-compliant-comment/