I’m developing a custom theme for Jekyll, and I need few trivial helper plugins to implement custom tags. I know that I can pack
_plugins in the contents repository or else make a new gem for it, but it’s such a hassle for a few trivial plugins. I tried to pack
_plugins within a theme, but the tags are not being picked up. Any other options I’ve missed?
In the mean time, I’ve got the following idea:
- Add a
lib subdirectory to my theme with
jekyll-my-theme to the
gems section of
_config.yml in addition to
Seems to work for me, any feedback?
Currently, this is not possible, though your workaround is a nice solution.
Tip: The entry to
gems: array need not be named
jekyll-*. i.e. if your theme is called
.rb file need not be named
omega-jekyll will do just as fine.
In future, if you do plan to release the plugins collection as a rubygem, there’s a PR slated for Jekyll v3.5 that will automatically
runtime_dependencies of gem-based themes. With that in place, end-users of theme-gems need not add the plugins required by the theme to their config-file’s
Gem::Specification.new do |spec|
spec.name = "omega-jekyll"
spec.version = "0.1.0"
spec.authors = ["John Doe", "Jane Doe"]
spec.add_runtime_dependency "jekyll", "~> 3.5"
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.0"
spec.add_runtime_dependency "omega-jekyll-plugins", "~> 0.1"
Building a site with above will have all the 3 plugins activated.