Various ways to include comments on your static site
Static site generators like Jekyll, Hugo or Hexo 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.
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 not able to find a free tier. Starts at 16$/month, which may not be worth it for a small blog.
- Remarkbox. Starts at 4-6$/month per domain. It also offers a free “development” plan for a single moderator and domain.
- Hosted Comments. The standard plan comes at 10$/month and it scales by page views. Currently, there is no free plan.
- 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 pageview-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.
- Mention. Currently in Beta.
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 is as simple as including an external link at the end of your articles. However, data ownership remains an issue you need to evaluate.
- Twitter. 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-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 his 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.
- Isso. Exists since 2013 and with 3400+ GitHub stars, it’s one of the most popular “indie” projects, i.e. not backed by a major organization. Unfortunately, it’s rarely updated and I had some problems getting it to run in 2016.
- Commento. A self-called “privacy-focused Disqus alternative”. A newcomer, created in November 2017 with 2700+ stars already. A hosted version is in private beta as of November 2018.
- Schnack. Another self-hosted option, with 1300+ stars on GitHub. Offers moderation and comments import from Disqus and Wordpress.
- Remark42. With 700+ stars it’s not as popular as the other projects, but it’s 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.
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. This method can be automated with Gitment. Another alternative is utterances, which provides a ready-to-use comments widget built on GitHub issues.
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).
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.
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 I’ve chosen a middle ground. I’m keeping Disqus for now, but 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.
I’ve presented different techniques to include comments on a static website. So, 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?
Any thoughts? Did I miss something? Just leave a comment (no pun intended).