Sort plugins so people can have "load orders". #1682

Merged
merged 1 commit into from Dec 5, 2013

Projects

None yet

3 participants

@envygeeks
Member

This allows for people to do something like "_plugins/1-autoload-global.rb" and have it load first and so on making it much easier to organize code and have a "header file" that does all the requiring up front if it's needed for all plugins.

@envygeeks envygeeks Sort plugins so people can have "load orders".
This allows for people to do something like "_plugins/1-autoload-global.rb" and have it load first and so on making it much easier to organize code and have a "header file" that does all the requiring up front if it's needed for all plugins.
7a1f63d
@parkr
Member
parkr commented Nov 5, 2013

I like this. @mattr-?

@mattr-
Member
mattr- commented Nov 5, 2013

Do we need to worry about the fact that this is not a numerical based sort? This means that with files 1-foo.rb, 2-bar.rb, and 10-baz.rb that the sort order will be 1, 10, 2 instead of 1, 2, 10.

@envygeeks
Member

IMO it's just meant to be basic and not involved like systemd or upstart and the code to first partition the array by the way they start and then naturally sort the numbers does not outweigh this simplicity IMO, but if you guys really want me to make it natural and partition and all that junk and rejoin I'd be happy to.

@mattr-
Member
mattr- commented Nov 5, 2013

No need to make it natural. Just wanted to get the clarification. Thanks!

@mattr-
Member
mattr- commented Nov 5, 2013

This looks good to me, but I want to wait to merge it for another day or two in case we need to make a 1.3.1 release for something super urgent.

@mattr- mattr- merged commit 4a2e5af into jekyll:master Dec 5, 2013

1 check passed

default The Travis CI build passed
Details
@mattr- mattr- added a commit that referenced this pull request Dec 5, 2013
@mattr- mattr- Update history to reflect merge of #1682 654fe61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment