Skip to content

Migrate comments on JeffGeerling.com to Remark42 #167

@geerlingguy

Description

@geerlingguy

After #158, I need to work on migrating all my existing threaded comments from my blog over to the new site.

This is a bit of complex lift, as some blog posts had hundreds of comments, and there are thousands of blog posts. In addition, there are a ton of threaded conversations, and even if I move to a flat commenting system, I'd like to preserve some indication of the threading (so ordering could be useful at least for the initial conversion).

The systems I've been evaluating the most are:

  • giscus: Uses GitHub Discussions for comments, and is pretty full-featured... but is not real-time (new comments don't appear on the site until you re-deploy), and users must have a GitHub account to post comments. It also relies on a third party service to host the client.js file / GitHub App (which needs permission for users to comment). So a whole ball of wax. But it's good for moderation (GitHub Discussions tooling is built-in), and doesn't require any additional hosting.
  • Meh by @splitbrain: This commenting system is built in PHP and requires a backend with a database + webserver. But it would allow anonymous comments, and can be completely independent/self-hosted.
  • Remark42: Self-hosted, seems a little simpler to start up than Meh, and has decent amount of development activity. Seems a little more 'social', with features like image embeds and upvote/downvote, etc. I'd probably turn most of that off.

It seems like Meh is what I'm leaning towards... with the understanding that it is not a 'big' project by any means (indeed, how few of us even have comments enabled on our blogs these days at all!). So I may have to fork and maintain my own copy at some point! But that's still a lot less taxing (IMO) than managing Drupal over the course of decades :)

The main thing in either case is I would like to keep my spam prevention in place, either using the same service (CleanTalk), or integrating some small LLM to apply a spam/not spam filter before accepting a comment. Then, a moderation queue like I have on my current blog, as there's still a lot of spam that leaks through even the best filters!

(Before I implemented CleanTalk and locked it down further with some Cloudflare rules, I was getting hundreds of spam comments a day...)

I've opened a discussion asking for feedback here: #171

Remark42 Implementation Notes

  • Overall pleased, and very fast locally at least :P
  • Doesn't have a 'must be approved before publish by default' option, which is how I moderated comments on my Drupal site (this discourages bad actors who spam out dozens or hundreds of comments in a short period of time...)
  • Doesn't have any integrated spam prevention option (I used CleanTalk on Drupal, but there's also Akismet); see Spam filter on the backend side umputun/remark42#754 for any progress there
    • One possible way to combat that is turning off completely anonymous comments and requiring email verification to post; this also (by default) pulls in avatars via Gravatar... for better or worse.
  • Ran into issue where I can't force plain text email by setting AUTH_EMAIL_CONTENT_TYPE=text/plain.
  • It seems like the comment form can be either light or dark — no option to set automatically based on system? So I'm using this workaround for automatic light/dark mode in lieu of that.
  • Mailpit is awesome. Using it now instead of Mailgun, which has been unmaintained for like 4 years :(
  • There doesn't seem to be a global UI that I can access? (See that same 'must be approved before publish' discussion I linked to earlier.)
    • There's an issue for premoderation, and an open PR, but without a global UI, it would still be a little annoying to manage—I guess I can just rely on email notifications to know when a comment is posted, and be sure to click through from there.
    • It just lets me observe comments on posts directly. So if a spammer came in and blasted 500 blog posts, I'd have to visit each post and delete those comments? Or maybe build my own separate backend?
  • I might disable user avatars, but didn't find an efficient way to do that in Remark42 (short of editing a template or using CSS—it seems like the Gravatar stuff would still run and cache avatars regardless...). So I opened Allow disabling avatar functionality?.

Remark42 Custom Migration Notes

  • I initially thought there would be a global admin UI (see above), but it looks like there's just the API, and admin on individual comment pages. So failing that, I'll have to dig around the Docker container to see how the schema works for a migration/import...
  • It looks like a file is created on the host in ./var/jeffgeerling_com.db, and it's a Bolt (bbolt) key/value database. There are a few browsers out there like boltdbweb, boltbrowser, and bolt-ui, should I want to go spelunking myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions