This blog engine started as a Golang self-learning exercise that evolved to something useful for me. One of my requirements was to not rely on any local database, to keep the blog deployment simple and cheap. This meant that, if I wanted to provide a comments section, I would need to rely on an external service provider.
Disqus did the job perfectly (I've had like 20 comments in 8 years 🤣😅), but I've always been concerned about the privacy implications of letting Disqus inject code (and cookies) into my visitors' frontend (if possible, I'd like to avoid those annoying cookie popups on my site).
Looking for an open-source and private-oriented alternative to Disqus, I found Giscus, which stores the comments as GitHub discussions in a public repo.
The migration process was pretty straightforward:
- Create a GitHub public repo and enable discussions on it.
- Install the Giscuss app in your user and organization, and give it access only to your discussions repository.
- Fill the configuration form in their main page and embed the printed
<script>
tag into your page HTML. - Optionally, I created a
giscus.json
file in the repository root preventing the submission of comments from any other domain.
In the index page, I've lost the "(N comments)" summary under each post title, but I could create my own data retriever from the GH API.
Now, to add your comments to this page, you need a Github user (Disqus allowed many other OAuth providers), but I think that this is a requirement that 99% of the target audience of this blog will meet.