Closed leandrolerena closed 6 months ago
Thanks for reporting. @alexvoss I'm pretty sure this is related to the cwd issue you encountered. We'll look into it, but please understand that it might take some time – it is tricky to fix and will require us to rewrite some things, but I agree that this should definitely work.
Thanks for looking into it. I totally understand. Feel free to ping me to test it!
Thanks for reporting. Fixed in f2f919c
. The projects plugin will now set the current working directory to the directory the mkdocs.yml
is located in and build the project from there. This should resolve all known issues with relative paths used in plugins and extensions when using the projects plugin.
There's a problem with your reproduction however that makes it crash regardless whether you're using the projects plugin or not. Snippets are stored inside docs
, but the path is incorrect in index.md
:
...
Reference the whole python file
```python
--8<-- "dummyproject-snippets/local.py" # <- incorrect
--8<-- "docs/dummyproject-snippets/local.py" # <- correct
...
After prepending `docs/` to both `local.py` snippet URLs, the build succeeds with and without the plugin.
Released as part of 9.5.17+insiders-4.53.6.
Thanks @squidfunk , that was a lot faster than anticipated!
And yes, even though the reproduction works on my side, it contains a nasty hack to circumvent an issue with paths for snippets (duplicate paths) which you just fixed.
I'll be happy to test everything in a clean environment. Have a good start into the week!
Context
I use the projects plugin to evaluate mkdocs for a documentation project. Therefore, I need documentation to be aggregated from different repositories.
In particular, I have two issues, one with git-authors, the other with pymdownx.snippets, which make me wonder if the following statement:
as the local build works perfectly.
See discussion on git-authors here: https://github.com/timvink/mkdocs-git-authors-plugin/issues/79
Bug description
git-authors plugin reports the following on the project included:
pymdownx.snippets do not work
Related links
Reproduction
reproduction.zip
Steps to reproduce
This will reproduce the error from snippets, you can remove the snippets by clearing the file content in
submodules/zebbra-mkdocs-dummyproject/docs/index.md
Browser
No response
Before submitting