geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
40 stars 2 forks source link

Migrate to Hugo + giscus? #158

Open geerlingguy opened 1 month ago

geerlingguy commented 1 month ago

Drupal 11 is here. I'm on Drupal 10, and it is (I believe) the current LTS release of Drupal, supported until June 2026.

I may upgrade to Drupal 11, but I've lost some of the enthusiasm for managing a (relatively) simple blog with something as heavyweight as Drupal.

Drupal requires a database, PHP, and a web frontend, and to survive relatively common DDOS attacks, I've had to put most things behind CloudFlare. Even with that, the backend still gets frequent 'probing' attacks that can cause instability, and I don't want to upgrade to some massive backend webservers to make that not happen.

I would be happier maintaining the blog as full-markdown, using Hugo, along with maybe giscus. I would need to have a migration path from Drupal to Hugo, accounting also for the thousands of redirects I have (this site has gone through a looong history, starting in my early college days, also housing some other content I originally built starting in 8th grade, lol).

And I don't want to lose any comments, as they are extremely helpful and add a ton to the website.

geerlingguy commented 1 month ago

Hugo has a Migrate to Hugo guide, which points to drupal2hugo. That project looks very old though, and still mentions 'CCK' heh.

Found a couple other projects too:

Following up on that 2nd option—maybe I could use Views to export data to some common format, then convert from that format back to Hugo.

kdpuvvadi commented 1 month ago

Exporting content isn’t the hard part, comments are hard, right ?

geerlingguy commented 1 month ago

@kdpuvvadi yes; especially considering threading :O

kdpuvvadi commented 1 month ago

What's the plan for the hosting, running on same host as the drupal currently running or server less such as vercel, cloudflare pages and etc?,

redirects are handled bit differently on each providers.

Cloudflare and netlify follow ipfs standard _redirects file with source destination code doc. But on vercel, it's with their config file vercel.json doc but hit or miss with _redirects.

geerlingguy commented 1 month ago

@kdpuvvadi definitely my own server—for now DigitalOcean, but eventually possibly self-hosted with an offsite hot replica.

geerlingguy commented 2 weeks ago

It looks like Meshtastic's blog is using giscus.

Regarding a comment migration, two options I have are:

  1. In the conversion from Drupal to markdown, include the comments for all legacy blog posts one-time as HTML or something, and leave them be.
  2. Build a tool to migrate each post's comments into Discussions, so giscus can load them. See https://github.com/giscus/giscus/issues/330 (note: That's about Disqus, but similar principle would apply for Drupal comments.)
bmartinez287 commented 1 week ago

How about using Tome? https://www.drupal.org/project/tome

geerlingguy commented 1 week ago

@bmartinez287 - That would require I still run Drupal somewhere; unfortunately, for hands-off operation, that would require probably a bit more effort than a full migration off Drupal.