You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the problem doesn't occur with the mkdocs or readthedocs themes
... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
When I build a doc where an .md contains:
---
tags:
- importing
- install
---
with mkdocs-material-8.2.10-insiders-4.13.0, I get a fail:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/mkdocs/__main__.py", line 236, in <module>
cli()
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/mkdocs/__main__.py", line 192, in build_command
build.build(config.load_config(**kwargs), dirty=not clean)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/mkdocs/commands/build.py", line 314, in build
_build_page(file.page, config, doc_files, nav, env, dirty)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/mkdocs/commands/build.py", line 212, in _build_page
context = config['plugins'].run_event(
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/mkdocs/plugins.py", line 102, in run_event
result = method(item, **kwargs)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/material/plugins/tags/plugin.py", line 89, in on_page_context
context["tags"] = [
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/material/plugins/tags/plugin.py", line 90, in <listcomp>
self.__render_tag(tag)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/material/plugins/tags/plugin.py", line 126, in __render_tag
type = self.tags_mapping.get(tag)
AttributeError: 'TagsPlugin' object has no attribute 'tags_mapping'
Upon looking at the source code of the newest tags/plugin.py, it does look fishy. I can see how tags_mapping may not get assigned, but then the .get() method does not provide a fallback.
Expected behaviour
No fail when using the tags plugin
Actual behaviour
Fail in the newest mkdocs-material-8.2.10-insiders-4.13.0 (was OK in previous)
Steps to reproduce
Use the tags plugin with a simple .md file that contains some tags in the metadata
I'm pretty confident this was fixed in the latest commit. I just released 8.2.11+insiders-4.13.1 which contains the fix. In case the issue persists, please reopen.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
When I build a doc where an .md contains:
with mkdocs-material-8.2.10-insiders-4.13.0, I get a fail:
Upon looking at the source code of the newest tags/plugin.py, it does look fishy. I can see how
tags_mapping
may not get assigned, but then the .get() method does not provide a fallback.Expected behaviour
No fail when using the
tags
pluginActual behaviour
Fail in the newest mkdocs-material-8.2.10-insiders-4.13.0 (was OK in previous)
Steps to reproduce
Use the
tags
plugin with a simple .md file that contains some tags in the metadataPackage versions
Configuration
The text was updated successfully, but these errors were encountered: