Set Up Isso for Comments on Hugo
On my blog, which uses Hugo as a static site generator, I wanted to offer a comment system. However, I didn’t want to use the paid Disqus service, so I looked for a simple, self-hosted solution.
The first solution I came across was CusDis. While it was relatively easy to integrate, the layout was not ideal. It looked outdated and didn’t scale properly to the current page width and height. This issue is documented, for example, in a GitHub issue.
So, I searched for an alternative and found Isso.
Setting Up Isso
You can use Docker for the setup.
- First, create two files with the content below. Setting documentation.
isso.cfg
[general]
dbpath = /db/comments.db
host =
https://myurl.ch/
public-endpoint = https://comments.myurl.ch
notify = smtp
[moderation]
enabled = true
[smtp]
username = myuser@uhlme.ch
password = abc123
host = mail.cyon.ch
port = 465
security = ssl
to = myuser@uhlme.ch
from = myuser@uhlme.ch
timeout = 10
[admin]
enabled = true
password = abc123
compose.yaml
services:
container:
image: "ghcr.io/isso-comments/isso:release"
volumes:
- ./isso.cfg:/config/isso.cfg
- ./db:/db
ports:
- 8080:8080
- Start Isso with
docker compose up
. - The Isso admin interface should now be accessible at http://localhost:8080/admin/. Log in with the password “abc123”.
Embedding Isso
To integrate Isso, add the following code:
<script
data-isso-lang="en"
src="http://localhost:8080/js/embed.min.js"></script>
<section id="isso-thread">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
Depending on the template you’re using, this code needs to be placed in different locations. If you’ve set up the site using the default Ananke theme (see Quickstart), you can copy the file themes/gohugo-theme-ananke/layouts/_default/single.html
to layouts/_default/single.html
. This will overwrite the theme’s default file with your custom version.
If you search for Disqus or Commento in the code, you will find the section where the respective comment system’s code is inserted. You can replace this section with the snippet above to integrate Isso.