title: New comment system for 寮居酒屋
author: 寮
date: 2022-07-04 06:30:00
tags:technology,webdev
threadid: AL812RpgqmL2MHw1Z2
----
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](https://gitler.moe/ryo/ryocomments)) 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!!
