Make Site#configure_theme more understandable

This commit is contained in:
Parker Moore
2016-08-30 11:58:21 -07:00
parent b937757dce
commit 4420c3b2af

View File

@@ -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