@@ -127,6 +127,10 @@ def setup_clean_mkdocs_folder(mkdocs_yml_path, output_path):
127
127
if "gen-files" in mkdocs_yml_path :
128
128
shutil .copyfile (str (Path (mkdocs_yml_path ).parent / "gen_pages.py" ), str (testproject_path / "gen_pages.py" ))
129
129
130
+ # Copy monorepo files
131
+ if "monorepo" in mkdocs_yml_path :
132
+ shutil .copytree ("tests/fixtures/monorepo" , str (testproject_path ), dirs_exist_ok = True )
133
+
130
134
return testproject_path
131
135
132
136
@@ -313,27 +317,27 @@ def validate_mkdocs_file(temp_path: str, mkdocs_yml_file: str):
313
317
314
318
315
319
MKDOCS_FILES = [
316
- 'basic_project/mkdocs_theme_no_locale.yml' ,
317
- 'basic_project/mkdocs.yml' ,
318
- 'basic_project/mkdocs_theme_timeago_locale.yml' ,
320
+ 'basic_project/mkdocs_creation_date.yml' ,
321
+ 'basic_project/mkdocs_custom_type.yml' ,
319
322
'basic_project/mkdocs_datetime.yml' ,
323
+ 'basic_project/mkdocs_exclude.yml' ,
324
+ 'basic_project/mkdocs_fallback_to_build_date.yml' ,
325
+ 'basic_project/mkdocs_locale.yml' ,
326
+ 'basic_project/mkdocs_meta.yml' ,
320
327
'basic_project/mkdocs_plugin_locale.yml' ,
321
- 'basic_project/mkdocs_with_override.yml' ,
328
+ 'basic_project/mkdocs.yml' ,
329
+ 'basic_project/mkdocs_theme_timeago_locale.yml' ,
322
330
'basic_project/mkdocs_theme_language.yml' ,
323
331
'basic_project/mkdocs_theme_locale_and_language.yml' ,
324
332
'basic_project/mkdocs_theme_locale_disabled.yml' ,
325
333
'basic_project/mkdocs_theme_timeago.yml' ,
326
334
'basic_project/mkdocs_theme_locale.yml' ,
335
+ 'basic_project/mkdocs_theme_no_locale.yml' ,
327
336
'basic_project/mkdocs_theme_timeago_override.yml' ,
328
337
'basic_project/mkdocs_theme_timeago_instant.yml' ,
329
- 'basic_project/mkdocs_creation_date.yml' ,
330
338
'basic_project/mkdocs_timeago_locale.yml' ,
331
339
'basic_project/mkdocs_timeago.yml' ,
332
- 'basic_project/mkdocs_fallback_to_build_date.yml' ,
333
- 'basic_project/mkdocs_locale.yml' ,
334
- 'basic_project/mkdocs_exclude.yml' ,
335
- 'basic_project/mkdocs_meta.yml' ,
336
- 'basic_project/mkdocs_custom_type.yml' ,
340
+ 'basic_project/mkdocs_with_override.yml' ,
337
341
# 'i18n/mkdocs.yml'
338
342
]
339
343
@@ -704,3 +708,19 @@ def test_ignored_commits(tmp_path):
704
708
page_with_tag = testproject_path / "site/page_with_tag/index.html"
705
709
contents = page_with_tag .read_text (encoding = "utf8" )
706
710
assert "May 4, 2018" in contents
711
+
712
+
713
+
714
+ def test_monorepo_compat (tmp_path ):
715
+ testproject_path = setup_clean_mkdocs_folder (
716
+ "tests/fixtures/monorepo/mkdocs.yml" , tmp_path
717
+ )
718
+ repo = setup_commit_history (testproject_path )
719
+ result = build_docs_setup (testproject_path )
720
+
721
+ # author = "Test Person <[email protected] >"
722
+ # with working_directory(testproject_path):
723
+ # repo.git.add(".")
724
+ # repo.git.commit(message="add all", author=author, date="1500854705")
725
+
726
+ assert result .exit_code == 0 , f"'mkdocs build' command failed with:\n \n { result .stdout } "
0 commit comments