Some plugins are distributed as gems. Why not give better support for them by requiring them explicitly? (in unsafe mode)?
/cc @mattr- @benbalter
The changes to the comment should probably be moved out into a separate commit, but I'm ok with it otherwise.
Add support for gem-based plugins.
To clarify, this adds a gems option to the config file?
I can't include a random, unrelated gem using that method, can I? e.g., what happens if I put gem: 'rails'.
I'd make the intent specific, and would rather name it something like plugins if possible.
Also, looks like you've got some permalink related stuff in this pull request.
@benbalter Great points? We have a plugins setting already – it sets the plugins directory location. :)
You can totally include a random, unrelated gem, but that makes no sense, so hopefully no one would do it!
Yeah, I guess I should do the permalink stuff elsewhere. I just didn't want to forget it.
I think you may have missed a backtick here
I guess we'll wait until v2.0 to switch to absolute permalinks.
Add in test plugin for inclusion.
Once we decide it's a good idea, I'll write docs. :)
Does this handle safe mode correctly? Can't quite tell.
Yeah, it's within the same block as the plugin require's.
I'd love to see this in v1.3.
The implementation looks fine.
I'm wondering thought why this just can't work by using Bundler. Stick the plugin gems in a Gemfile and only run through the Bundler.require stuff if in safe mode.
Some systems can't use bundler and some people don't use bundler? I'm not sure I've ever heard of Bundler.require before, and most plugin managers/users likely won't have either. I was thinking this would be most similar to current behaviour and we can offer custom error messages for jekyll-specific requiring.
Bundler.require is a method that handles requiring all the gems in your Gemfile if I understand Bundler's API correctly. The more that I think about it though, the more I like your simpler solution better.
Update history to reflect merge of #1557
YAY 🎉 😄 😉 👍 💯 🆒
Is falk that it see who go on
Too late now, but FYI this stuff snuck in.
We need to do this anyway