Moving From Disqus to Giscus with Hugo SSG

Moving From Disqus to Giscus with Hugo SSG

Goodbye Disqus, Hello Giscus

After using Disqus for a long time as a comment platform, also known as Comment-as-a-service, this website has finally switched to giscus after considering another similar platform that also uses GitHub, namely utterances.

Starting

When I first built this website, I was confused about which comment system to use. Since this site is an SSG (Static Site Generator) and does not have a database connection, using a third party comment platform was the best option. In Hugo, there is a default template for Disqus comments, so Disqus was chosen as the comment platform for this blog.

However, this made the website heavier because of the many assets and scripts that had to be loaded by Disqus. After some time, I considered creating a simple CSS and JS setup so that comments would only appear when a show comments button was clicked. But in my opinion, this actually reduced the number of people interested in leaving comments.

New Platform

Some time later, around May 1, 2017, utterances appeared. It is a comment platform that uses GitHub issues as the comment system. I thought about migrating, but I did not have time to modify the Hugo theme code.

Another Similar Platform

A few years later, around May 25, 2021, giscus was released. It is similar to utterances, but giscus uses GitHub Discussions as the comment platform, which I think is a better approach. Therefore, the website comments were finally migrated to giscus.

Is It Hard?

The migration process is quite easy. You just need to create a new repository or use an existing one, install the giscus app, and enable the Discussions feature in that repository.

Unfortunately, previous comments stored in Disqus cannot be migrated to giscus. But that is fine since there were not that many comments anyway.

On the theme side, you only need to add the JS script provided by https://giscus.app/ into your theme. In this case, the JS script was added only to single.html because other parts of the site do not require comments.

See ya

You can directly try leaving a comment here