al-folio icon indicating copy to clipboard operation
al-folio copied to clipboard

Convert to Gem-based theme

Open harper357 opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. Gem-based themes are easier to use if you already have a website, want to use version control, or want to upgrade/change themes.

Describe the solution you'd like If possible, changing the installation to a gem-based theme makes it much easier to install and upgrade.

harper357 avatar Sep 13 '20 11:09 harper357

Thanks for the great suggestion!

For future reference, adding a couple of links:

  • https://jekyllrb.com/docs/themes/#creating-a-gem-based-theme
  • https://github.com/jekyll/minima (the default Jekyll theme, which is gem-based)

alshedivat avatar Sep 13 '20 16:09 alshedivat

By the way, I did such a conversion (to the best of my lacking Ruby packaging abilities) in the gem branch of my fork. I use it for my own site as a git submodule which is a used as a local Gem dependency, instead of being published.

I never opened a PR for it because I cannot imagine an upgrade path for all existing users who didn't start their site out using the theme as a Gem like I did. Especially since this is now a template repository.

sim642 avatar Jul 02 '23 15:07 sim642

@alshedivat given @sim642 comments, do you believe this is still relevant?

george-gca avatar Nov 22 '23 19:11 george-gca

Since there's now a quarterly release schedule, it might still be feasible to do this as follows:

  1. Convert this into a gem, but develop it in a separate repository, keeping this one as the template repository. All changes to the theme should be made to the gem repository, not this template one.
  2. On every release (which isn't too often now), the gem changes can be copied over into the template repository (e.g. using git subtree). Users of the current template repository can then just keep using the theme as-is, independent of the gem.
  3. New users could be directed to use the theme via the gem instead. This maybe even wouldn't need a new template repository which uses the gem properly instead of copying, because most Jekyll themes seem to work just fine this way.

My gem-based fork isn't fully up to date at the moment, but usually this hasn't been too difficult to update (just some files moving around I think). I just haven't had the time.

sim642 avatar Nov 23 '23 09:11 sim642

What are the main advantages of using a Gem based theme?

george-gca avatar Nov 23 '23 14:11 george-gca

I see two advantages of gem-based themes:

  • publishing on rubygems.org, which makes it easy to manage theme releases and updates (in principle, should be possible to update gem-based themes by just running bundle update <theme-name>)
  • creating a new website using a gem-based theme can be done by calling bundle jekyll new <path>

that said, the above assumes users are familiar with the ruby ecosystem and going to use the above features. however, most of al-folio users don't really have any ruby background, and in fact create their websites by just using the repo template and by simply editing files directly on github. adding a gem-based theme in a separate repo and then maintaining two repos is going to add a lot of overhead for maintainers, and we don't really have that extra bandwidth.

my suggestion is to not convert al-folio into a gem-based theme. if some of the community members feel strong about it, they are welcome to fork the repository, turn it into a gem-based theme, and maintain it. whoever does that is more than welcome to join our team as a maintainer.

alshedivat avatar Jan 03 '24 16:01 alshedivat