Darek Kay's picture Darek Kay

Various ways to include comments on your static site

Static site generators like Eleventy, Jekyll or Hugo have become a popular choice for a blogging platform or a CMS. When using something like WordPress or Medium you get a comment section out of the box. It is not as straightforward in a static environment. In this article, I will summarize different options to provide your audience with a way to leave a comment.

Table of contents:

Integrated third-party

3rd party services are mostly easy to integrate. On the downside, they may hurt both performance and privacy. Comments are loaded via JavaScript, so they may not be indexed by search engines. Additionally, users need to have (or create) an account in order to post a comment (which might be a pro when building a community). Finally, all comments are located on an external server over which you have no control. The provider may reuse the data or shut down the service anytime (not unusual after acquiring competitors).

Here are some common third-party providers:

  • Disqus. Probably the most popular comment hosting service. It offers a basic ads-supported plan, but it comes with some privacy, security and performance problems.
  • Facebook comments. Another established provider with similar privacy concerns as Disqus.
  • Muut. Small and ad-free, but I was unable to find a free tier. Starts at 16$/month, which may not be worth it for a small blog.
  • Remarkbox. Offered as a "pay what you can" service.
  • JustComments. A pay-as-you-go service, so your monthly expenses depend on your page views. Starts at 5$/month. A basic version can be self-hosted.
  • CommentBox. Offers a free plan with 100 comments per month. The pricing for unlimited comments starts at 10$/month.
  • HyperComments. Another page view-based service. Starts at 2$/month for a single site.
  • GraphComments. Starts with a generous 1M page views per month free tier. However, a Facebook script is injected, which leads to privacy concerns.
  • FastComments. No free tier, starts at 5$/month.
  • Hyvor Talk. Premium only, starts at 5$ per month.
  • ReplyBox. Starts at 6$/month for 20.000 monthly page views.
  • Caint. A free open-source comment service.

Off-site hosting

When you care about your website's performance but don't want to miss the convenience of third-party services, you may want to outsource the comments completely. The implementation effort is as low as including an external link at the end of your articles. However, data ownership remains an issue you need to evaluate.

  • Twitter or Mastodon. You probably promote your articles via Twitter already. We can reverse this process. For every blog post, include a link back to your Tweet, where people can leave their comments.
  • Reddit. Create your own subreddit and post a link to every new blog article. As a bonus, your posts can be voted on, so you get a nice popularity overview.
  • Hacker News. Similar to Reddit, but aimed towards a more technical audience. However, you don't get a dedicated space for your links.

Whether this is a viable option also depends on your reader's demographics.

Self-hosted

Self-hosting blog comments solves many 3rd party issues as you're in charge of everything. This also means that you have to take over the whole administration process, including spam protection (or delegate this issue to another service like Akismet).

  • Discourse. It's a whole discussion platform, mostly used to replace classic discussion boards. It can also be utilized to host comments, as used by the co-founder Jeff Atwood on their static blog.
  • Talkyard. Similar to Discourse. It combines a forum, Q&A, chat and blog comments. Talkyard also comes with affordable hosted plans starting at 0.5 €/month.
  • Coral / Talk. Built by Mozilla and some leading news websites.
  • Cactus Comments. Federated comment system, based on the Matrix protocol.
  • Isso. Exists since 2013 and with 4400+ GitHub stars, it's one of the most popular "indie" projects, i.e., not backed by a major organization. Unfortunately, I had some problems getting it to run in 2016.
  • Juvia. One of the oldest (2011) yet still maintained open-source commenting systems.
  • Commento. A self-called "privacy-focused Disqus alternative". Created in November 2017, with 3500+ GitHub stars. A hosted version is available.
  • Schnack. Another self-hosted option, with 1700+ stars on GitHub. Offers moderation and comments import from Disqus and Wordpress.
  • Remark42. With 2.8k+ stars, it's a popular alternative that is actively maintained and extended.
  • Comntr. A new open source project. It is an integrated 3rd party tool that can be run like a self hosted solution.
  • Glosa. An underrated open source project. Offers importing comments from Disqus.
  • Cusdis. A new (as of April 2021) open-source project.
  • Komento. A decentralized comment hosting powered by IPFS. As of April 2021, it's in Beta phase.
  • HashOver. A free and open source PHP comment system designed for completely anonymous comments and easy theming.

GitHub

If you're targeting software developers, consider using GitHub for comments. Create a GitHub issue for each blog post and load the issue comments on your site. Here are some related open-source tools:

  • Utterances. A lightweight comments widget built on GitHub issues. Actively maintained as of May 2021.
  • Giscus. A comment system powered by GitHub discussions. Heavily inspired by Utterances and actively maintained.
  • Gitment. A comment system based on GitHub issues. Not maintained since 2018.

For a broader audience, you can still utilize GitHub without a required account. Staticman first turns comments into a format like JSON or YAML. Then, it either commits them automatically into your git repository, or it creates a pull request (if you prefer comment moderation).

Webmentions

As part of the IndieWeb community, webmentions are a federated/decentralized way to share comments, likes and other human interactions. It's rather a technical topic, so check out Sebastian De Deyne's blog post for more information.

Manual process

If you don't get a lot of comments, think about adding them manually. Let your readers email you via a form or a link at the end of every post. You get fully static comments without JavaScript, some kind of moderation and maybe even spam protection (depending on your email provider). This comes at a cost of manual work.

No comments

Finally, removing comments altogether is also an option. I suggest adding at least a "Drop me an email" link at the bottom of the page. I've received some valuable comments over the years, but I believe they would also have reached me via email if I had no comment section. However, you won't be able to build a community with people interacting with one another.

Jeff Atwood claims that a blog without comments is not a blog. Sure, he gets hundreds of comments, and he has built a big community around it. But this may not apply to everyone. Leo Babauta from Zen Habits turned off comments so he could spend more time creating content than moderating comment spam.

The middle ground

In five years of blogging, I've got 77 comments (~1.28 comments per month). That's way too little interaction to invest much time in a self-hosted solution. But I still care about the (at least initial) page load, so before removing the comments in 2020, I've chosen a middle ground. I've placed a "Load comments" button, so nothing gets loaded unless the user clicks on it.

You can apply this to most of the methods mentioned in this article.

Conclusion

I've presented different techniques to include comments on a static website. Which option should you choose for your site? There is no silver bullet. The best method depends on your requirements:

  • How much time are you prepared to invest in the setup/moderation?
  • How important is performance/privacy/data ownership to you?
  • Who is your target audience?
  • Do you want to build a community?

On this blog, I decided to go with the "off-site hosting" solution combined with an email link.

Any thoughts? Did I miss something? Leave a comment (no pun intended).


Related posts

Want to leave a comment?

Join the discussion at Twitter or Mastodon. Feel free to drop me an email. 💌

Various ways to include comments on your static site