From 53e459d0d589edfe6e71cd2ba757f6b7e1512201 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 3 Nov 2025 19:16:23 +0200 Subject: [PATCH] feat(build-docs): add redirect to user-guide --- apps/build-docs/src/build-docs.ts | 2 +- apps/build-docs/src/index.html | 10 ++++++++++ apps/build-docs/src/main.ts | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 apps/build-docs/src/index.html diff --git a/apps/build-docs/src/build-docs.ts b/apps/build-docs/src/build-docs.ts index 7679cb961..788e4a924 100644 --- a/apps/build-docs/src/build-docs.ts +++ b/apps/build-docs/src/build-docs.ts @@ -55,7 +55,7 @@ async function buildDocsInner() { // Build User Guide console.log("Building User Guide..."); - await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), ""); + await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), "user-guide"); // Build Developer Guide console.log("Building Developer Guide..."); diff --git a/apps/build-docs/src/index.html b/apps/build-docs/src/index.html new file mode 100644 index 000000000..47a0bfb34 --- /dev/null +++ b/apps/build-docs/src/index.html @@ -0,0 +1,10 @@ + + + + + Redirecting... + + +

If you are not redirected automatically, click here.

+ + \ No newline at end of file diff --git a/apps/build-docs/src/main.ts b/apps/build-docs/src/main.ts index 8e6804fe5..19d533420 100644 --- a/apps/build-docs/src/main.ts +++ b/apps/build-docs/src/main.ts @@ -1,7 +1,7 @@ import { join } from "path"; import BuildContext from "./context"; import buildSwagger from "./swagger"; -import { existsSync, mkdirSync, rmSync } from "fs"; +import { cpSync, existsSync, mkdirSync, rmSync } from "fs"; import buildDocs from "./build-docs"; import buildScriptApi from "./script-api"; @@ -21,6 +21,9 @@ async function main() { await buildDocs(context); buildSwagger(context); buildScriptApi(context); + + // Copy index file. + cpSync(join(__dirname, "index.html"), join(context.baseDir, "index.html")); } main();