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
File "/opt/homebrew/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mkdocs/__main__.py", line 250, in build_command
build.build(cfg, dirty=not clean)
File "/opt/homebrew/lib/python3.11/site-packages/mkdocs/commands/build.py", line 308, in build
_populate_page(file.page, config, files, dirty)
File "/opt/homebrew/lib/python3.11/site-packages/mkdocs/commands/build.py", line 177, in _populate_page
page.markdown = config.plugins.run_event(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mkdocs/plugins.py", line 520, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/material/plugins/tags/plugin.py", line 100, in on_page_markdown
return self._render_tag_index(markdown, page)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/material/plugins/tags/plugin.py", line 171, in _render_tag_index
for name in sorted(
^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'str'
Expected behaviour
Missing tags should be handled properly, ideally with a proper error message.
Actual behaviour
See description
Steps to reproduce
See description
Package versions
Python: 3.11
MkDocs: 1.4.2
Material: Latest insider version
Configuration
See description
System information
Operating system: macOS Ventura
Browser: FF
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I'm unsure what to do here – what's the ideal workflow for you? We could issue a warning about the empty tag, filter it, and just go on. This would also fail --strict mode, which in my view would be desirable.
Fixed in squidfunk/mkdocs-material-insiders@9fdaf6d71 and squidfunk/mkdocs-material-insiders@07c8eff6d. I've also added a more explicit check for the tags format (must be a str, int, float or bool – everything else will not work), and ensured that the tags entry is a list. If the tag is left empty, the plugin now prints a warning:
WARNING - Page 'path/to/file.md' includes invalid tag: (empty)
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
When adding an empty tag, the
tags
plugin throws an unhandled exception.mkdocs.yml:
sample.md:
Build result:
Expected behaviour
Missing tags should be handled properly, ideally with a proper error message.
Actual behaviour
See description
Steps to reproduce
See description
Package versions
Configuration
See description
System information
The text was updated successfully, but these errors were encountered: