12926 shaares
335 private links
335 private links
The comments live on a small Phoenix server I run, called Popsicle Boat. Each post has a companion thread there; publishing a post makes one API call that creates the thread and writes its URL into the post’s front matter. That URL is the only coupling between the two systems.
At build time, Hugo fetches each thread’s replies.json and renders the replies as plain HTML once per post per build, cached, capped indentation. If the server is unreachable, the build carries on and renders no comments. The comment system cannot break the blog.
The page is rebuilt every time a comment is added, but the cost is cheap.
A tutorial is available at https://www.popsicleboat.com/for-bloggers/api