Make Site#configure_theme more understandable
This commit is contained in:
parent
b937757dce
commit
4420c3b2af
|
@ -423,15 +423,14 @@ module Jekyll
|
|||
|
||||
private
|
||||
def configure_theme
|
||||
self.theme = nil
|
||||
return unless config["theme"]
|
||||
|
||||
if config["theme"].is_a?(String)
|
||||
self.theme = Jekyll::Theme.new(config["theme"])
|
||||
else
|
||||
Jekyll.logger.warn "Theme:",
|
||||
"value of 'theme' in config should be String, but got #{config["theme"].class}"
|
||||
end
|
||||
self.theme =
|
||||
if config["theme"].is_a?(String)
|
||||
Jekyll::Theme.new(config["theme"])
|
||||
else
|
||||
Jekyll.logger.warn "Theme:", "value of 'theme' in config should be "
|
||||
"String to use gem-based themes, but got #{config["theme"].class}"
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue