geoffwilliams@home:~$

no-comment - drop in replacement for staticman

If you run a blog like this, 99.9% of all comments are spam so they need approval before being added. For a few years this site has used staticman but Heroku free dynamos stopped a while ago and staticman hasn’t been updated for years.

A new solution for comments

Time to update and save money.

SaaS/Hosted

First up, check for cheap/free hosted solutions:

These look nice but don’t seem to have much activity happening.

Staticman forks

While researching, I found comment-worker which looked pretty close to what I wanted but I couldn’t get it working. It uses Cloudflare Workers which is a great way to run Typescript with basically zero infrastructure.

I didn’t research other forks too much, the comment that stuck out the most while looking through some of the staticman issues was:

The cloudflare worker based alternative in that thread seems promising to me and is probably how I’d go about deploying something like Staticman now that Heroku free tier is gone.

no-comment

After spending a couple of hours looking for ready to use solutions I gave up and decided to write my own. How hard can it be right?

Just need to:

  1. Quickly learn how to Deploy your own Cloudflare Workers
  2. Write some TypeScript to collect the data from my old staticman form and create a pull request on GitHub

I wrote a very limited CloudFlare Worker that does exactly what I want:

  • Only processes form fields I use
  • Only works with GitHub
  • Requires manual approval for all comments (merge pull request)
  • No notifications, captures, etc.

I took a fresh start with this code, it was based on CloudFlare’s TypeScript template and then I did the minimum amount of work possible to create a pull request.

Probably that is all I will add to this project as it’s all I really need. Feel free to get in touch if you are interested in helping to add other features.

no-comment is free software released with MIT License

If you would like to try out no-comment, please take a look at https://github.com/GeoffWilliams/no-comment. It’s also powering the comment box below.

Have lots of fun!

Post comment

Markdown is allowed, HTML is not. All comments are moderated.