I am using the monorepo plugin to create nested documentations of my repo packages. I have a lot of packages, but the basic structure of the repo is:
root
|- mkdocs.yml
|- docs
|- components
|- packages
|- package1
|- mkdocs.yml
|- docs
|- api.md
|- folder_with_py_files
|- file.py
All is working fine with monorepo plugin, but when I try to build the documentation without having installed the packages, is not finding them, and I'm even using the path:[] at both levels inside all the mkdocs.yml, the package and the root ones.
Inside the .md file, I'm calling the module using:
::: folder_with_py_files.file
But the error persists that is not importing the module correctly, and thus is failing when trying to build the root documentation:
ERROR - mkdocstrings: Importing 'folder_with_py_files.file' failed, possible causes are:
- an exception happened while importing
- an element in the path does not exist
...
ERROR - Error reading page 'package1/api.md':
ERROR - Could not collect 'folder_with_py_files.file'
Aborted with a BuildError!
Any ideas on how to fix this?
If you specified
path, that's a typo: it should bepaths(plural).See https://mkdocstrings.github.io/python/usage/#finding-modules.