I tried to use mkdocs-git-revision-date-localized-plugin together with [mkdocs-gen-files] to auto-generate references from Python doc strings. During the build, I encountered the following error message:
[git-revision-date-localized-plugin] Unable to find a git directory and/or git is not installed. To ignore this error, set option 'fallback_to_build_date: true',
followed by a git.exc.InvalidGitRepositoryError.
The fundamental problem is that mkdocs-gen-files stores its output in temporary files outside the project's repository. Hence, git-revision-date-localized cannot find a repository and produces the error.
On the other hand, it is possible to silence the error by setting fallback_to_build_date: true in mkdocs.yaml, such that the auto-generated pages are marked with the build date. This, however, turns the errors for each file into warnings, and thus it is impossible to use mkdocs in --strict mode.
Also, the exclude option does not work in this case since the names of the temporary files are unknown before build time.
I currently don't have a proper solution since it is obviously not straightforward to map auto-generated temporary files to the corresponding code files.
I tried to use
mkdocs-git-revision-date-localized-plugintogether with [mkdocs-gen-files] to auto-generate references from Python doc strings. During the build, I encountered the following error message:followed by a
git.exc.InvalidGitRepositoryError.The fundamental problem is that
mkdocs-gen-filesstores its output in temporary files outside the project's repository. Hence,git-revision-date-localizedcannot find a repository and produces the error.On the other hand, it is possible to silence the error by setting
fallback_to_build_date: truein mkdocs.yaml, such that the auto-generated pages are marked with the build date. This, however, turns the errors for each file into warnings, and thus it is impossible to usemkdocsin--strictmode.Also, the
excludeoption does not work in this case since the names of the temporary files are unknown before build time.I currently don't have a proper solution since it is obviously not straightforward to map auto-generated temporary files to the corresponding code files.