Add `gems` for better plugin management #1557

Merged
merged 3 commits into from Oct 23, 2013

Projects

None yet

5 participants

@parkr
Member
parkr commented Sep 16, 2013 edited

Some plugins are distributed as gems. Why not give better support for them by requiring them explicitly? (in unsafe mode)?

Fulfills #1417.

  • Implement
  • Write test gem
  • Add documentation

/cc @mattr- @benbalter

@mattr-
Member
mattr- commented Sep 17, 2013

The changes to the comment should probably be moved out into a separate commit, but I'm ok with it otherwise.

@benbalter
Contributor

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.

@parkr
Member
parkr commented Oct 4, 2013

@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.

@troyswanson troyswanson commented on an outdated diff Oct 4, 2013
site/docs/upgrading.md
<p markdown="1">
- Starting with Jekyll v1.1.0, `relative_permalinks` will default to `false`,
+ Starting with Jekyll v2.0, permalinks` will default to `false`,
@troyswanson
troyswanson Oct 4, 2013 Member

I think you may have missed a backtick here

@parkr
Member
parkr commented Oct 4, 2013

Once we decide it's a good idea, I'll write docs. :)

@parkr
Member
parkr commented Oct 15, 2013

Thoughts?

@mattr-
Member
mattr- commented Oct 16, 2013

Does this handle safe mode correctly? Can't quite tell.

@parkr
Member
parkr commented Oct 16, 2013

Yeah, it's within the same block as the plugin require's.

@parkr
Member
parkr commented Oct 16, 2013

I'd love to see this in v1.3.

@mattr-
Member
mattr- commented Oct 18, 2013

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.

@parkr
Member
parkr commented Oct 18, 2013

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.

@mattr-
Member
mattr- commented Oct 18, 2013

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.

@parkr parkr referenced this pull request Oct 18, 2013
Closed

Plugin Ecosystem #1272

@mattr- mattr- merged commit 23ad7fa into master Oct 23, 2013

1 check passed

default The Travis CI build passed
Details
@mattr- mattr- deleted the require-gems-plugins branch Oct 23, 2013
@mattr- mattr- added a commit that referenced this pull request Oct 23, 2013
@mattr- mattr- Update history to reflect merge of #1557 6c001f1
@parkr
Member
parkr commented Oct 23, 2013

YAY 🎉 😄 😉 👍 💯 🆒

@huricanne

Is falk that it see who go on

@benbalter benbalter commented on the diff Nov 2, 2013
site/docs/upgrading.md
<p markdown="1">
- Starting with Jekyll v1.1.0, `relative_permalinks` will default to `false`,
+ Starting with Jekyll v2.0, `relative_permalinks` will default to `false`,
@benbalter
benbalter Nov 2, 2013 Contributor

Too late now, but FYI this stuff snuck in.

@parkr
parkr Nov 2, 2013 Member

We need to do this anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment