Missing theme config file raises an error.

Previously a warning was raised and the build proceeded.
This commit is contained in:
Waylan Limberg
2018-07-11 13:58:13 -04:00
parent ad867796eb
commit c99ea4e250
2 changed files with 3 additions and 4 deletions

View File

@@ -229,7 +229,7 @@ authors should review how [search and themes] interact.
[search config]: ../user-guide/configuration.md#search
[search and themes]: ../user-guide/custom-themes.md#search_and_themes
#### `theme_dir` Configuration Option fully Deprecated.
#### `theme_dir` Configuration Option fully Deprecated
As of version 0.17, the [custom_dir] option replaced the deprecated `theme_dir`
option. If users had set the `theme_dir` option, MkDocs version 0.17 copied the
@@ -238,6 +238,7 @@ value to the `theme.custom_dir` option and a warning was issued. As of version
### Other Changes and Additions to Version 1.0
* A missing theme configuration file now raises an error.
* Empty `extra_css` and `extra_javascript` settings no longer raise a warning.
* Add highlight.js configuration settings to built-in themes (#1284).
* Close search modal when result is selected (#1527).

View File

@@ -83,12 +83,10 @@ class Theme(object):
theme_config = utils.yaml_load(f)
except IOError as e:
log.debug(e)
# TODO: Change this warning to an error in a future version
log.warning(
raise ValidationError(
"The theme '{0}' does not appear to have a configuration file. "
"Please upgrade to a current version of the theme.".format(name)
)
return
log.debug("Loaded theme configuration for '%s' from '%s': %s", name, file_path, theme_config)