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
When running the insider, I got the following error:
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/mkdocs/__main__.py", line 181, in serve_command
serve.serve(dev_addr=dev_addr, livereload=livereload, watch=watch, **kwargs)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 63, in serve
config = builder()
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 58, in builder
build(config, live_server=live_server, dirty=dirty)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/mkdocs/commands/build.py", line 282, in build
files = config['plugins'].run_event('files', files, config=config)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/mkdocs/plugins.py", line 102, in run_event
result = method(item, **kwargs)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/material/plugins/blog/plugin.py", line 270, in on_files
data = self._generate_files_for_archive(config, files)
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/material/plugins/blog/plugin.py", line 552, in _generate_files_for_archive
self._generate_file(path, "blog-archive", name),
File "/home/costa/.cache/pypoetry/virtualenvs/cleanrl-ghSZGHE3-py3.9/lib/python3.9/site-packages/material/plugins/blog/plugin.py", line 673, in _generate_file
os.path.join(
File "/home/costa/.pyenv/versions/3.9.5/lib/python3.9/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The relevant code is
if "template" not in page.meta:
page.meta["template"] = os.path.normpath(
os.path.join(
self.config.get("blog_custom_dir", "."),
"blog-post.html"
)
)
so it looks like the insider is not finding blog_custom_dir's blog-post.html properly.
Material: pip show mkdocs-material | grep -E ^Version: this command does not work. I installed via pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git.
Thanks for reporting! blog_custom_dir is an internal feature that is not meant to be used by the user. It's also why it's not documented. However, it should not error. I'll look into it right away.
Fixed in squidfunk/mkdocs-material-insiders@21578b300. The blog_custom_dir options is just for internal use, in order to make theme extension work for Material for MkDocs itself. The problem is that the theme is using the custom_dir setting, so overriding is not possible as advertised on the documentation. This only matters to maintainers, so no worry.
It should not be necessary to set blog_custom_dir anymore.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
I was trying to use the blog plugin and set up the directory according to https://squidfunk.github.io/mkdocs-material/blog/2022/09/12/blog-support-just-landed/, but
mkdocs serve
error outExpected behaviour
The blog post example should work.
Actual behaviour
When running the insider, I got the following error:
The relevant code is
so it looks like the insider is not finding
blog_custom_dir
'sblog-post.html
properly.Steps to reproduce
Follow https://squidfunk.github.io/mkdocs-material/blog/2022/09/12/blog-support-just-landed/.
Package versions
python --version
: Python 3.9.5mkdocs --version
: mkdocs, version 1.3.1pip show mkdocs-material | grep -E ^Version
: this command does not work. I installed viapip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
.Configuration
System information
The text was updated successfully, but these errors were encountered: