3 ms·
If you are rendering your blog or website with a static site generator, you could also consider importing comments as content files into your website source and
by susam 9mo ago
If you are rendering your blog or website with a static site generator, you could also consider importing comments as content files into your website source and then rendering them as part of the build. The full workflow would look like this:
1. Accept comments via email, CGI scripts, server-side program or by any other means that suits you. A simple hack that requires no server-side scripting: if you run your own web server, you can submit comments as GET query parameters logged in access.log, then extract them using grep, sed, etc. Personally, I use a server-side program to accept POST requests and write comments to a text file on the web server.
2. Review submitted comments. Delete spam.
3. Add comments to your website source repository as .md, .html or whatever format you use, similar to how you add blog posts as content files to your source.
4. Render comments alongside the rest of your site using your static site generator. Depending on the nature of your static site generator, this may require using or creating a template or layout that iterates over the comments and renders them.
It is a fairly hands-on workflow, so it may not suit everybody, but this is how I do it for my personal website. I see two main benefits of this approach. Since the review is manual in step 2, no spam can ever make it to my website. Step 3 ensures comments live entirely under my control, so I never need to worry about migrating them between platforms in the future.
- andai 9mo ago>1. Accept comments via email I only accept comments via Fax ;)
- smnplk 9mo agoI only accept human written letters.
- dotancohen 9mo agoCarried by pigeons.
- manuelmoreale 9mo agoYou say this ironically but as a result of my blog I started receiving letters from people and it’s so rewarding. Such an amazing way to interact with people.
- ckardaris 9mo ago>1. Accept comments via email In case anyone is curious, I (very) recently implemented a similar comment system based on email. I posted a write-up about it[1]. [1]: https://ckardaris.github.io/blog/2026/01/22/my-comments-run-on-email.html https://ckardaris.github.io/blog/2026/01/22/my-comments-run-...
- deleted 9mo ago[deleted]
- ramijames 9mo agoThis is a really neat idea.
- kurtis_reed 9mo agoSounds terrible
- susam 9mo agoNot for you then. That is perfectly fine. I have been using this approach for seven years now, and it has worked very well for me. For anyone else who is interested in taking a look, here is my setup: * The server-side program that processes the POST requests: https://github.com/susam/susam.net/blob/0.5.0/form.lisp#L254-L318 https://github.com/susam/susam.net/blob/0.5.0/form.lisp#L254... * The static site generator reads the comment files and renders them alongside the rest of the website: https://github.com/susam/susam.net/blob/0.5.0/site.lisp#L869-L890 https://github.com/susam/susam.net/blob/0.5.0/site.lisp#L869... * End result: https://susam.net/comments/ https://susam.net/comments/ The last link shows the consolidated comments page that lists all approved comments posted across my entire personal website. The 'View original comment' link under each comment points to the individual comment page for each post.
- RestartKernel 9mo agoI can see how that would work. For a small website, you're probably only looking at a few comments per day at absolute most, and you'll be reviewing them anyway to filter/approve them. (And the implementation lends to easy automation, since you just need to programatically update the Markdown file instead.)
- theshrike79 9mo agoI have a vague recollection that 4chan basically works like this. They just generate static pages on every comment because that's more efficient than trying to have a fancy database.