Migrate to Hugo + giscus?
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.
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:
- https://github.com/heyrocker/config_to_docs
- https://github.com/briwagner/drupal-hugo-export
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.
Exporting content isn’t the hard part, comments are hard, right ?
@kdpuvvadi yes; especially considering threading :O
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.
@kdpuvvadi definitely my own server—for now DigitalOcean, but eventually possibly self-hosted with an offsite hot replica.
It looks like Meshtastic's blog is using giscus.
Regarding a comment migration, two options I have are:
- 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.
- 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.)
How about using Tome? https://www.drupal.org/project/tome
@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.
Late to the party but Astro is a really awesome static site generator (SSG). I've used it on several static sites and landing pages and it's been really enjoyable to work with.
It's built to use Markdown (with MDX support) as one of its primary content sources.
It would likely be possible to create a LegacyComments component that could encapsulate any sins necessary to port legacy comments to something static; be they an inerrable data format or an html blob.
Another potential commenting system (if it can be easily embedded, which it looks like it can) is Meh, by @splitbrain.
I think the biggest component I'd need to invest a little time in is the moderation side. Would love to have at least a small AI model or some heuristics to weed out the obvious spam, so my moderation queue doesn't grow obscenely large. Right now I approve between 5-20 comments per day on my blog, after they get through the current spam system I have implemented.