So a lot of people use Mastodon or Github issue for the comment section on their website. Here is a guide on using Mastodon for comment section https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/ .
But is it possible to do the same thing with lemmy? I think its a good idea for people to put comments. An account can be created easily as well.
The script is calling to Mastodon API to get the Mastodon post, which should be achievable with the Lemmy API as well.
As of now, Lemmy use API v3, so:
https://lemmy.ml/api/v3/post?id=<post id>
.Can you provide like some more details? Is there anything else I have to change?
Quite a lot actually, maybe you’d have to rewrite it entirely. Mastodon comment is represented as flat, while Lemmy comment has a tree structure. What makes it harder is that the data in the API does not represent it as such, so you’d have to somehow turns it into one. I don’t think it’s too hard a problem, but I don’t think I have energy for it.