New comment system for 寮居酒屋

Return to home
寮、 2022/07/04 — technology, webdev

I’ve implemented a comment system on this site.
And I had to do it in quite a clever way too, considering the fact that this site is statically generated, so there’s no database or anything to even enable comments to begin with.
Another way would be to install some bloated, censorship-happy, JS-based comment system, but they all suck.
So I made my own backend in PHP (source code) that fetches replies from Pleroma, and shows that as comments, so all I have to do in the static site generator is to configure an iframe that will look for the thread id on Pleroma, and fetch it via its API using PHP’s CURL implementation.

So I still run a static website, and still 0 Javascript.
Win-fucking-win!!