diff --git a/lib/jekyll/plugin_manager.rb b/lib/jekyll/plugin_manager.rb index c52a5205..394aa9d6 100644 --- a/lib/jekyll/plugin_manager.rb +++ b/lib/jekyll/plugin_manager.rb @@ -17,6 +17,7 @@ module Jekyll def conscientious_require require_plugin_files require_gems + require_from_bundler end # Require each of the gem plugins specified. @@ -30,6 +31,15 @@ module Jekyll end end + def require_from_bundler + unless site.safe + require "bundler/setup" + Bundler.require(:jekyll_plugins) + end + rescue LoadError + false + end + # Check whether a gem plugin is allowed to be used during this build. # # gem_name - the name of the gem