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 the privacy plugin is enabled and the site_url parameter isn't set, building the project fails.
To reproduce, create a minimal MkDocs project using the mkdocs.yml below.
Error message:
Traceback (most recent call last):
File "/opt/homebrew/bin/mkdocs", line 8, in<module>sys.exit(cli())
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/mkdocs/__main__.py", line 250, in build_command
build.build(cfg, dirty=not clean)
File "/opt/homebrew/lib/python3.10/site-packages/mkdocs/commands/build.py", line 332, in build
config.plugins.run_event('post_build', config=config)
File "/opt/homebrew/lib/python3.10/site-packages/mkdocs/plugins.py", line 519, in run_event
result = method(**kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/material/plugins/privacy/plugin.py", line 187, in on_post_build
self._fetch_dependents(f.read(), file, config),
File "/opt/homebrew/lib/python3.10/site-packages/material/plugins/privacy/plugin.py", line 335, in _fetch_dependents
url = posixpath.join(config.site_url, file.url)
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Expected behaviour
We should be able to build a project even when the site_url parameter is omitted, i.e., is null.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
When the privacy plugin is enabled and the
site_url
parameter isn't set, building the project fails.To reproduce, create a minimal MkDocs project using the
mkdocs.yml
below.Error message:
Expected behaviour
We should be able to build a project even when the
site_url
parameter is omitted, i.e., isnull
.Actual behaviour
See description.
Steps to reproduce
See description.
Package versions
Configuration
System information
The text was updated successfully, but these errors were encountered: