Site#configure_theme: warn in case the 'theme' config is not a string

This commit is contained in:
Parker Moore 2016-08-07 12:03:50 -07:00
parent 2bd592077d
commit b937757dce
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 8 additions and 1 deletions

View File

@ -424,7 +424,14 @@ module Jekyll
private
def configure_theme
self.theme = nil
self.theme = Jekyll::Theme.new(config["theme"]) if config["theme"].is_a?(String)
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
end
private