The future of theme gems as I see it..:
Requires Jekyll 4.0
Self-Contained Modules
Theme gems will be self-contained insta-jekyll-modules. All they need would be content. This allows users to freely switch between themes without breaking their site or losing their customizations. For this to happen a few things will be prescribed and expected to be followed. A theme-gem ecosystem would be:
- SCAFFOLD DIRECTORIES [
_layouts | _includes | _sass | _data | assets ]
- every theme gem shall contain a configuration file named the same as the gem-name e.g.
minima.yml and it will reside inside _data/
- core styles and settings will be defined in
minima.yml and referenced in templates with liquid using the theme namespace. e.g. {{ theme.myvariable }}
- the layout names will be standard for all theme-gems:
home for index
post for posts
page for pages
default as the parent layout for above layouts
When overriding defaults, the user creates the required file / copies from the gem_dir. into a directory named the same as the theme gem in use. e.g. minima/_data/minima.yml | minima/_layouts/ | minima/_includes/ etc
Jekyll 4.0 shall look for these directories first in the site.root and then in the gem.
Following this convention ensures easy switching between theme gems at the same time preserving their customizations.
The future of theme gems as I see it..:
Requires Jekyll 4.0
Self-Contained Modules
Theme gems will be self-contained insta-jekyll-modules. All they need would be content. This allows users to freely switch between themes without breaking their site or losing their customizations. For this to happen a few things will be prescribed and expected to be followed. A theme-gem ecosystem would be:
_layouts|_includes|_sass|_data|assets]minima.ymland it will reside inside_data/minima.ymland referenced in templates with liquid using thethemenamespace. e.g.{{ theme.myvariable }}homefor indexpostfor postspagefor pagesdefaultas the parent layout for above layoutsWhen overriding defaults, the user creates the required file / copies from the gem_dir. into a directory named the same as the theme gem in use. e.g.
minima/_data/minima.yml|minima/_layouts/|minima/_includes/etcJekyll 4.0 shall look for these directories first in the
site.rootand then in the gem.Following this convention ensures easy switching between theme gems at the same time preserving their customizations.