mirror of
https://github.com/SharpeTronics/jekyll-spaceship.git
synced 2025-12-17 00:03:13 -05:00
fix: load site config broke in group plugins (#12)
This commit is contained in:
parent
b3b7d1fb15
commit
a30d7e46f0
@ -8,5 +8,5 @@ require 'jekyll-spaceship/cores/register'
|
||||
|
||||
module Jekyll::Spaceship
|
||||
Logger.display_info
|
||||
Config.load
|
||||
Config.load_config
|
||||
end
|
||||
|
||||
@ -35,7 +35,7 @@ module Jekyll::Spaceship
|
||||
@@store[section] = deep_merge(default, @@store[section])
|
||||
end
|
||||
|
||||
def self.load(config = self.site_config)
|
||||
def self.load(config = {})
|
||||
config = deep_merge(
|
||||
{ CONFIG_NAME => DEFAULT_CONFIG },
|
||||
config
|
||||
@ -50,8 +50,11 @@ module Jekyll::Spaceship
|
||||
end
|
||||
end
|
||||
|
||||
def self.site_config
|
||||
Jekyll.sites.first.config
|
||||
def self.load_config
|
||||
# post load site config for `group :jekyll_plugin`
|
||||
Jekyll::Hooks.register :site, :after_init do |site|
|
||||
self.load(site.config)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user