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 without comment moderation.
- Hosted Comments. The standard plan comes at 10$/month and it scales by page views. Currently, there is no free plan.
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 3$/month.
- Coral / Talk. Built by Mozilla and some leading news websites.
- Isso. Exists since 2013 and with 2600+ 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.
- Commento. A self-called “privacy-focused Disqus alternative”. A newcomer, created in November 2017 with 2300+ stars already.
- Schnack. I mention it for the sake of completeness because currently, Schnack does not work on the developer’s own blog.
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.
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).