Change the output folder structure for HTML docs

This commit is contained in:
Veronica Berglyd Olsen
2025-04-20 17:21:42 +02:00
parent f15ed32101
commit 529b93f154
+3 -4
View File
@@ -72,11 +72,11 @@ def buildHtmlDocs(args: argparse.Namespace | None = None) -> None:
print("==================")
print("")
bldRoot = ROOT_DIR / "dist_doc"
bldRoot = ROOT_DIR / "dist_doc" / "html"
docsDir = ROOT_DIR / "docs"
locsDir = ROOT_DIR / "docs" / "source" / "locales"
locsDir.mkdir(exist_ok=True)
bldRoot.mkdir(exist_ok=True)
bldRoot.mkdir(exist_ok=True, parents=True)
lang = args.lang if args else ["all"]
build = []
@@ -99,8 +99,7 @@ def buildHtmlDocs(args: argparse.Namespace | None = None) -> None:
print("")
if outDir.exists():
shutil.rmtree(outDir)
outDir.mkdir()
(docsDir / "build" / "html").rename(outDir / "html")
(docsDir / "build" / "html").rename(outDir)
else:
raise Exception(f"Build returned error code {ex}")