by Alex on 2019-7-23 14:00:00
Static sites are becoming very popular due to more scalable and cheaper hosting. But there is a problem if you need to add dynamic user-generated content like comments.
You are probably planning to switch or already switched to a static site powered by a popular static site generator such as Gatsby, Jekyll or Hugo. So how can you add a commenting system so that visitors could discuss and contribute to the content you publish?
There are two main approaches to add comments:
I have seen people extract a third approach, such as storing comments on GitHub and using the API to publish comments at the build time. I'd classify this as using the 3rd-party system because Github is indeed a 3rd-party. The main advantage of this hosting option is that it's usually free, and the disadvantage is that there could be a delay before a comment is published and the feature set is restricted by what Github supports.
In my opinion, self-hosting is a good option for small non-commercial or hobby projects. When a commenting system is an essential part of your website, it's better to go with a 3rd-party service such as JustComments. The little amount of money you pay to a 3rd party saves you a lot of time. It's worth mentioning that JustComments can be self-hosted too if you don't want to spend dedicated money on the comment hosting. Check out the open source server implementation which works together with the open source frontend of JustComments.
Also, I wanted to write a comparison between different commenting systems but I have found many good articles out there already: