Open dvolodin7 opened 1 year ago
mkdocs-static-i18n v1.0.6 is incompatible with mkdocs-gen-files plugin.
The following warning is emitted for every auto-generated page
WARNING - mkdocs_static_i18n: Unhandled file case - connection-types-reference/juniper.md
and then, the page is removed from navigation and not being rendered at all.
The root of the problem is in reconfigure.py in the reconfigure_files function. Exactly, in this condition
reconfigure.py
reconfigure_files
if is_relative_to(file.abs_src_path, mkdocs_config.docs_dir):
Files, generated by mkdocs-gen-file have abs_src_path in the temporary directory. i.e.
File( src_uri='connection-types-reference/juniper.md', dest_uri='connection-types-reference/juniper/index.html', name='juniper', url='connection-types-reference/juniper/' ) abs_src_path=/tmp/mkdocs_gen_files_cg_osgf4/connection-types-reference/juniper.md
As a result, the condition is not satisfied and the file is excluded.
I think we cannot rely on physical file location as the criteria. Maybe
file.is_documentation_page()
is a better criteria?
Just found the same bug affects the mkdocs-material blog plugin as well.
mkdocs-static-i18n v1.0.6 is incompatible with mkdocs-gen-files plugin.
The following warning is emitted for every auto-generated page
and then, the page is removed from navigation and not being rendered at all.
The root of the problem is in
reconfigure.py
in thereconfigure_files
function. Exactly, in this conditionFiles, generated by mkdocs-gen-file have abs_src_path in the temporary directory. i.e.
As a result, the condition is not satisfied and the file is excluded.
I think we cannot rely on physical file location as the criteria. Maybe
is a better criteria?