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
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 8 additions and 9 deletions

View File

@ -423,14 +423,13 @@ module Jekyll
private
def configure_theme
self.theme = nil
return unless config["theme"]
self.theme =
if config["theme"].is_a?(String)
self.theme = Jekyll::Theme.new(config["theme"])
Jekyll::Theme.new(config["theme"])
else
Jekyll.logger.warn "Theme:",
"value of 'theme' in config should be String, but got #{config["theme"].class}"
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