Closed EduardoBautista closed 3 years ago
@EduardoBautista Good idea! I am gonna look on how to do it, but your help is welcomed!
With bundle exec jekyll new-theme jasper2
I get this jasper2.gemspec
# coding: utf-8
Gem::Specification.new do |spec|
spec.name = "jasper2"
spec.version = "0.1.0"
spec.authors = ["Fábio Madeira"]
spec.email = ["fbiomadeira@gmail.com"]
spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|_sass|LICENSE|README)}i) }
spec.add_runtime_dependency "jekyll", "~> 3.6"
spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"
end
I guess with some edits, shouldn't take much to make a gem out of this...
I just link here two examples of gemified jekyll themes:
I wonder if plugin files can be bundled with theme files.
With gem-based themes, some of the site’s directories (such as the assets, _layouts, _includes, and _sass directories) are stored in the theme’s gem, hidden from your immediate view. Yet all of the necessary directories will be read and processed during Jekyll’s build process.
Any news on this ? Is it worth it to give it a shot, or has anyone already tried and stumbled into some major issue ?
Trying this (along with some other customizations) on my fork, but the plugins bundled in the gem are not being run from the site using the theme in gem form. No sure if this is by (jekyll) design or a bug.
No sure if this is by (jekyll) design or a bug.
Only few folders are copied from the gem themes:
With gem-based themes, some of the site’s directories (such as the assets, _layouts, _includes, and _sass directories) are stored in the theme’s gem
Source: https://jekyllrb.com/docs/themes/
Hence, the _plugin folder is not part of it.
Only few folders are copied from the gem themes:
With gem-based themes, some of the site’s directories (such as the assets, _layouts, _includes, and _sass directories) are stored in the theme’s gem
Source: https://jekyllrb.com/docs/themes/
Hence, the _plugin folder is not part of it.
Yeah, I saw that, but I was hoping that was not an exhaustive list. Anyway, I have worked around the limitation in my scenario by copying over the plugins I need.
Any news on this one?
Gem now live at https://rubygems.org/gems/jasper2
Usually a Jekyll theme is a gem that can just be added to the Gemfile.