This was actually supposed to be published on the 12th. :)
I saw an interesting post from fellow Blaugustian Cascade: Making a Comment System with Eleventy and Netlify - cascading.space.
Implementation of comments on a static blog is a topic I’ve wrestled with for lo these past three and a half years. The short version is: You can’t do it. The long version is: You can do it, but probably not the way you want to.
I’ve been using a third-party comment system called CommentBox. It’s very lightweight and doesn’t have many features, but it’s free and it works. Kind of.
But I’ve been thinking about rolling my own comment system for years now, and today I actually started hacking together some code.
I started a new Next.js project for this purpose. Next.js is my go-to platform for anything with a web front-end these days, until or unless I find something better that is also relevant to my day job.
I figure I’m only going to need an API to retrieve comments, and a web page to authenticate and enter comments. I expect I’ll implement it in the same way as most third-party comment systems; as a widget called with some Javascript on the post page.
I tend to use AWS for all my hosting needs, so I expect I’m only going to need a DynamoDB table to store the comments and another one to store the users.
And that’s where the problems begin. Before I’ve even done anything, I already need to store a table of users, which is the one thing I really don’t want to do.
Because, you see, you have to have some kind of authentication in order to implement comments on a blog. And that means you have to store user data. And that means adding an assortment of security and privacy issues to your blog. What fun.
Is there any way to get around that and still provide a secure user experience? Nope.
But I can think of plenty of ways to get around it which leave the door wide open for users to impersonate each other in comment sections. My blog’s probably not big enough to worry about it too much, though.
P.S. I did not get very far with this before realizing I couldn’t work out something I was happy with.
This post is for day 12 of Blaugust 2024.