Closed
Description
Context
Updated from v9.5.18 to v9.5.19
Bug description
The social plugin now fails when font autoloading is disabled:
Traceback (most recent call last):
File "/storage/workspace/Freeyourgadget/website/.venv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/mkdocs/__main__.py", line 284, in build_command
build.build(cfg, dirty=not clean)
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/mkdocs/commands/build.py", line 265, in build
config = config.plugins.on_config(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/mkdocs/plugins.py", line 587, in on_config
return self.run_event('config', config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/mkdocs/plugins.py", line 566, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/material/plugins/social/plugin.py", line 160, in on_config
self.font = self._load_font(config)
^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/workspace/Freeyourgadget/website/.venv/lib/python3.11/site-packages/material/plugins/social/plugin.py", line 452, in _load_font
name = config.theme.get("font", {}).get("text", "Roboto")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'get'
Related links
- This is following the autoloading disabling configuration mentioned in https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/?h=font#autoloading
- I believe the regression was introduced by 6a761ed
Reproduction
site_name: My Docs
theme:
name: material
font: false
plugins:
- social
Steps to reproduce
- Use the social plugin
- Set
font: false
in the theme configuration - Notice the build fails
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.