Skip to content

Commit 53e459d

Browse files
committed
feat(build-docs): add redirect to user-guide
1 parent c54befa commit 53e459d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

apps/build-docs/src/build-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function buildDocsInner() {
5555

5656
// Build User Guide
5757
console.log("Building User Guide...");
58-
await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), "");
58+
await importAndExportDocs(join(__dirname, DOCS_ROOT, "User Guide"), "user-guide");
5959

6060
// Build Developer Guide
6161
console.log("Building Developer Guide...");

apps/build-docs/src/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="refresh" content="0; url=/user-guide">
5+
<title>Redirecting...</title>
6+
</head>
7+
<body>
8+
<p>If you are not redirected automatically, <a href="/user-guide">click here</a>.</p>
9+
</body>
10+
</html>

apps/build-docs/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { join } from "path";
22
import BuildContext from "./context";
33
import buildSwagger from "./swagger";
4-
import { existsSync, mkdirSync, rmSync } from "fs";
4+
import { cpSync, existsSync, mkdirSync, rmSync } from "fs";
55
import buildDocs from "./build-docs";
66
import buildScriptApi from "./script-api";
77

@@ -21,6 +21,9 @@ async function main() {
2121
await buildDocs(context);
2222
buildSwagger(context);
2323
buildScriptApi(context);
24+
25+
// Copy index file.
26+
cpSync(join(__dirname, "index.html"), join(context.baseDir, "index.html"));
2427
}
2528

2629
main();

0 commit comments

Comments
 (0)