Change the output folder structure for HTML docs
This commit is contained in:
+3
-4
@@ -72,11 +72,11 @@ def buildHtmlDocs(args: argparse.Namespace | None = None) -> None:
|
|||||||
print("==================")
|
print("==================")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
bldRoot = ROOT_DIR / "dist_doc"
|
bldRoot = ROOT_DIR / "dist_doc" / "html"
|
||||||
docsDir = ROOT_DIR / "docs"
|
docsDir = ROOT_DIR / "docs"
|
||||||
locsDir = ROOT_DIR / "docs" / "source" / "locales"
|
locsDir = ROOT_DIR / "docs" / "source" / "locales"
|
||||||
locsDir.mkdir(exist_ok=True)
|
locsDir.mkdir(exist_ok=True)
|
||||||
bldRoot.mkdir(exist_ok=True)
|
bldRoot.mkdir(exist_ok=True, parents=True)
|
||||||
|
|
||||||
lang = args.lang if args else ["all"]
|
lang = args.lang if args else ["all"]
|
||||||
build = []
|
build = []
|
||||||
@@ -99,8 +99,7 @@ def buildHtmlDocs(args: argparse.Namespace | None = None) -> None:
|
|||||||
print("")
|
print("")
|
||||||
if outDir.exists():
|
if outDir.exists():
|
||||||
shutil.rmtree(outDir)
|
shutil.rmtree(outDir)
|
||||||
outDir.mkdir()
|
(docsDir / "build" / "html").rename(outDir)
|
||||||
(docsDir / "build" / "html").rename(outDir / "html")
|
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Build returned error code {ex}")
|
raise Exception(f"Build returned error code {ex}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user