Almost EVERYONE who tried headless systems said they saw benefits. Download the state of CMS now!

Storyblok now on AWS Marketplace: Read more

O’Reilly Report: Decoupled Applications and Composable Web Architectures - Download Now

Empower your teams & get a 582% ROI: See Storyblok's CMS in action

Skip to main content

A comment system for your headless CMS?

Try Storyblok

Storyblok is the first headless CMS that works for developers & marketers alike.

We get asked about how one would add a comment system to their headless CMS. during this article, you will learn about the options you can follow including one introduced to me (I read his blog after got spammed on Twitter about it) by the awesome Phil Hawksworth.

Section titled Why do we use comment systems? Why do we use comment systems?

There is blog article covering a topic on if you should or shouldn't use comments in your blog. We believe in doing what is best for your users, even if that means some extra time, effort or expense. The reasons why you may want to allow comments in your blog posts or not is summarized nicely in a post on Fizzle.

To reduce your own efforts as much as possible on the technical side we try not to reinvent the whole thing all over again and use services to reach the goal: comments.

Section titled Disqus Disqus

Disqus allows you to add a comment system to your blog by only adding a line of code in your article detail page. Not only is it easy to integrate but also offers a great solution for your blog. To name some of them:

  • Automated Spam Moderation
  • Banned and trusted lists
  • Moderation of comments via E-Mail
  • Shadow banning
  • Temporarily timeout users

So you're not only receiving a full functional comment box for your article, you will also get your full moderation toolset, which is as you see at the end of the article that we're using Disqus ourself.

Disqus with Storyblok

To reduce the page-load and first interaction time for our users we do load Disqus only after scrolling below a certain area. I would recommend adding more effort to keeping your page fast instead of building your very own.

Section titled JAMstack/Static Comments System JAMstack/Static Comments System

Yes... I know I've just told you to not to build your own, but this one is really nice and it showcases the possibility with cloud functions and is also useful with static and JAMstack sites. As always Phil nailed this in his article JAMstack Comments.

Phil's goal in the linked article is to build a comment system which you could use on your own site, that:

  • Does not depend on client-side JavaScript
  • Could work with any static site generator
  • Includes moderation
  • Sends notifications when new comments need moderating
  • Bakes the comments into your site, so that they load quickly and appear in searches

His example does make a use of some features powered by Netlify, a platform for automating, deploying and hosting web projects. I'll skip most of the tutorial since you can read that in the link above, but want you to know how this would connect to a headless CMS such as Storyblok.

JAMstack comments and Storyblok

You can see above that by introducing a setup like the one introduced by Phil, it will be loosely coupled and without dependencies to your headless CMS. You can always exchange the comment system and even remove it completely. Add a flag to your content-type in your headless CMS to define if comments should be allowed for a blog post or not. All that would be left for you is to check for that flag and insert your the form accordingly.

Section titled There are more There are more

You're right. There are way more possible solutions to get a comment system on your blog post. Keep in mind that there are solutions ready for you, which will reduce your effort in maintenance and development for certain tasks tremendously, that's not only true for comment systems:

  • Storyblok: Saves your time by offering a customizable interface and API for all your content.
  • Netlify: Saves your time by automating deploying and hosting your web projects.
  • Disqus: Saves your time by enabling you to use comment and build communities.

Section titled Conclusion Conclusion

A comment system like Disqus can save you a lot of time to keep your focus on the actual content instead of background tasks. Overall it will be your own decision and as much as I can recommend it, some will disagree and that's fine. I'd love your approaches to comment system and would also love to hear your favorite one in the comment below.


Dominik Angerer

Dominik Angerer

A web performance specialist and perfectionist. After working for big agencies as a full stack developer he founded Storyblok. He is also an active contributor to the open source community and one of the organizers of Scriptconf and Stahlstadt.js.