-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Hello! In the docs its stated that a theme can have an empty mkdocs_theme.yml
file:
However, if the theme offers no configuration options, the file is still required and can be left blank.
Unfortunately this seems to have changed recently and now themes with empty mkdocs_theme.yml
files are causing an exception when building:
> mkdocs build --verbose
DEBUG - Loading configuration file: ./mkdocs.yml
DEBUG - Loaded theme configuration for 'custom_theme' from
'./venv/lib/python3.12/site-packages/custom_theme/mkdocs_theme.yml':
None
Traceback (most recent call last):
[...]
File "./venv/lib/python3.12/site-packages/mkdocs/config/config_options.py", line 868, in run_validation
return theme.Theme(**theme_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "./venv/lib/python3.12/site-packages/mkdocs/theme.py", line 61, in __init__
self._load_theme_config(name)
File "./venv/lib/python3.12/site-packages/mkdocs/theme.py", line 143, in _load_theme_config
if parent_theme := theme_config.pop('extends', None):
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'pop'
Metadata
Metadata
Assignees
Labels
No labels