Comments & GatsbyJS

Published: 6/4/2019   Est. 1 minute to read

There are a lot of different solutions for comments on a JAMstack site. Disqus is ubiquitous, but introduces a lot of bloat. Facebook Comments is a solid platform, but requires a Facebook account—something I am increasingly trying to avoid relying on. Commento seems like a great Disqus alternative, but my site doesn't get enough traffic to justify a paid solution. Staticman was a non-starter, I don't want comments mixed into my repository.

I ended up settling on Twitter. It's not a traditional comment system, nothing is actually loaded in the blog post itself. Instead, there is a "Discuss on Twitter" button that directs to a search for tweats mentioning the post canonical link.

button discussOnTwitter

  const discussUrl = `${encodeURIComponent(
<Button className="button marginRight" href={props.discussUrl}>