3 ms·
How do you handle comments in a "static blog"?
by zie1ony 10mo ago
How do you handle comments in a "static blog"?
- stevekemp 10mo agoNot the poster, but what I did was to have a CGI script which would receive incoming comments and write them to "/srv/data/blog/comments/XXX/TIMESTAMP.txt" or similar. The next time I rebuilt the blogs the page "XXX" would render a loop of all the comments, ordered by timestamp, if anything were present. The CGI would send a "thanks for your comment" reply to the submitter and an email to myself. If the comment were spam I'd just delete the static file.
- xienze 10mo agoThe way I’ve seen it done is that you render a script tag that embeds a third party comment system (like Disqus).
- begueradj 10mo agoThird party options (Disqus, for example)
- wiether 10mo agoParent was talking about ownership, going for a third-party service feels like the exact opposite?
- susam 10mo ago> How do you handle comments in a "static blog"? The comment form is implemented as a server-side program using Common Lisp and Hunchentoot. So this is the only part of the website that is not static. The server-side program accepts each comment and writes to a text file for manual review. Then I review the comments and add them to my blog. In the end, the comments live like normal content files in my source code directory just like the other blog posts and HTML pages do. My static site generator renders the comment pages along with the rest of the website. So in effect, my static site generator also has a static comment pages generator within it.
- ronjakoi 10mo agoOn mine, I don't. Any interactivity is too much hassle for me to worry about wrt moderation etc. I also don't particularly care what random people have to say. If my friends like what I wrote, they can tell me on Signal or comment on the Bluesky post when I share the link.
- philistine 10mo agoI have my email barebones on the about page. I get five spam emails a week and that’s enough of a price to pay to have one way to be reached.
- mrngm 10mo agoYou could have a _somewhat_ static blog and incorporate something like Webmentions[0] for comments or replies. For example, Molly White's microblog[1] shows the following text below the post: Have you responded to this post on your own site? Send a webmention[0]! Note: Webmentions are moderated for anti-spam purposes, so they will not appear immediately. I find this method to be a sweet spot between generating content on your own pace, while allowing other people to "post" to your website, but not relying on a third-party service like Disqus. [0] https://indieweb.org/Webmention https://indieweb.org/Webmention [1] https://www.mollywhite.net/micro/entry/202511101848 https://www.mollywhite.net/micro/entry/202511101848