bitcoinops / bitcoinops.github.io

Bitcoin Optech website
MIT License
253 stars 121 forks source link

Build site using Hugo instead of Jekyll (upgrade tracking issue) #1551

Open harding opened 6 months ago

harding commented 6 months ago

Since its inception, this site has always been built with Jekyll but Jekyll appears to be largely unmaintained; it's changelog indicates the last time a major feature was added was "4.0.0 / 2019-08-19". I don't we particularly need new features from the static site compiler, but as we consider adding new features to the site, I want to make sure we're building on a foundation that will continue to be supported for years to come.

Hugo appears to be actively maintained. In my tests, it also completes a whole site compile at least 10x faster than Jekyll. I've locally completed some preliminary conversion of our site to Hugo and I don't see anything that will prevent us from a complete conversion. This issue for for discussing any objections to a conversion as well as tracking its progress. The plan is:

Please let me know your thoughts on converting. Until we complete conversion, I suggest a moratorium on adding major new features to the site, with the exception of an update to the Compatibility Matrix (as work on that has already begun).

murchandamus commented 6 months ago

I like this approach. While it might be a bit more work to maintain the dual infrastructure until the switch-over, it should make the switch significantly smoother than some sort of one-time switch over. I don’t have much information on either Hugo or Jekyll, but generally running on an unmaintained stack seems like a source of future pain, so what you write sounds sensible to me. Also very excited not to wait a few minutes every time I want to preview a branch. :D

kouloumos commented 5 months ago

This is not an immediate action, but when/if you need to re-create the Topics index in Hugo native way, I might be able to help as we essentially mirrored the index for bitcointranscripts.

harding commented 5 months ago

@kouloumos thanks, that is helpful!

harding commented 3 months ago

The largest remaining challenge I have for the conversion to Hugo are the podcast pages. I want to propose a change to how we generate those, hopefully without creating too much extra work for @bitschmidty. First, here's an overview of how they work now.

This is a lot of nice automation (thanks @kouloumos !). The problem I'm having now is that Hugo doesn't natively provide anywhere near the same degree of content manipulation ability (AFAICT). I think it might be theoretically possible to replicate the above using Hugo's templating language, but it's far beyond my ability. Here's what I propose instead:

I think that's only a medium amount of extra work each week for Mike but it eliminates the need for a plugin on the Jekyll side and makes implementing the podcast/transcript stuff in Hugo very straightforward.

A small potential upside of this is that the new method is a bit more flexible because it's entirely based on static content. If we have weird newsletters (like the year in review newsletters) or decide to do podcasts of blog posts or other stuff, or if anyone wants to manually edit the top part of a podcast page, any non-standard stuff can be addressed with manual editing of the source content.

Feedback appreciated!

kouloumos commented 3 months ago

I think it might be theoretically possible to replicate the above using Hugo's templating language,

Do you have a branch with the current state of the transition to Hugo? I can try to replicate the current logic.

harding commented 3 months ago

@kouloumos oh, that'd be neat! I was hoping to open a WIP PR soon anyway, so I'll ping you here as soon as I get that done.

bitschmidty commented 2 months ago

@kouloumos Thanks for taking a look at Hugo and replicating the current logic there.

@harding If replicating in Hugo doesnt work, Im up for this (more manual, more flexible) approach to keep the ball moving on Hugo.