Here is how I set up Disqus on a blog using Eleventy (11th for the intimates) and how to manage the display of the number of comments on an article.
Setting up comments
In your metadata file, add an entry for your disqus (disqusShortname) and, if you have not already done so, another one for the root URL of your site (rootUrl).
You must add this piece of code where you want your Disqus module to appear by taking care to use our previous variables to make each item unique to Disqus.
The number of comments
Here is the result:
To obtain this rendering, I followed this tutorial provided by Disqus in order to gather the necessary for setting up a comment counter.
By default, Disqus will display X comments. In order to remove the suffix, it is necessary to adjust some parameters via Disqus if we want to achieve the same result as displayed in the previous picture.
If you have questions or comments, don’t hesitate to let me know. Otherwise, have fun with your new Disqus module!