feat(build-docs): add redirect to user-guide

This commit is contained in:
Elian Doran
2025-11-03 19:16:23 +02:00
parent c54befa8a1
commit 53e459d0d5
3 changed files with 15 additions and 2 deletions

View File

@@ -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...");

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0; url=/user-guide">
<title>Redirecting...</title>
</head>
<body>
<p>If you are not redirected automatically, <a href="/user-guide">click here</a>.</p>
</body>
</html>

View File

@@ -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();