mirror of
https://github.com/SharpeTronics/jekyll-spaceship.git
synced 2025-12-18 00:03:24 -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
|
module Jekyll::Spaceship
|
||||||
Logger.display_info
|
Logger.display_info
|
||||||
Config.load
|
Config.load_config
|
||||||
end
|
end
|
||||||
|
|||||||
@ -35,7 +35,7 @@ module Jekyll::Spaceship
|
|||||||
@@store[section] = deep_merge(default, @@store[section])
|
@@store[section] = deep_merge(default, @@store[section])
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.load(config = self.site_config)
|
def self.load(config = {})
|
||||||
config = deep_merge(
|
config = deep_merge(
|
||||||
{ CONFIG_NAME => DEFAULT_CONFIG },
|
{ CONFIG_NAME => DEFAULT_CONFIG },
|
||||||
config
|
config
|
||||||
@ -50,8 +50,11 @@ module Jekyll::Spaceship
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.site_config
|
def self.load_config
|
||||||
Jekyll.sites.first.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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user