From 7a1f63d9941bcc4b5b39052737c8fb514aa769de Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Thu, 31 Oct 2013 07:12:54 -0500 Subject: [PATCH] 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. --- lib/jekyll/site.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index b892a31a..12ce1ae4 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -73,7 +73,7 @@ module Jekyll # directory. unless self.safe self.plugins.each do |plugins| - Dir[File.join(plugins, "**/*.rb")].each do |f| + Dir[File.join(plugins, "**/*.rb")].sort.each do |f| require f end end