Skip to content

Commit 0b7604c

Browse files
committed
feat: Add 404.html
1 parent 9a14443 commit 0b7604c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

404.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<head>
2+
<meta http-equiv="refresh" content="5; URL=https://ui5.github.io/tutorials/" />
3+
4+
<script>
5+
6+
// Redirect for old single tutorial to multi tutorials setup - build folder
7+
if (window.location.href.startsWith("https://ui5.github.io/tutorials/build/")) {
8+
var pathname = window.location.pathname.replace("/tutorials/build/", "/tutorials/walkthrough/build/");
9+
window.location.replace("https://ui5.github.io/" + pathname + window.location.search);
10+
}
11+
12+
</script>
13+
</head>
14+
15+
<body>
16+
<p>If you are not redirected in five seconds, please navigate manually to <a
17+
href="https://ui5.github.io/tutorials/">https://ui5.github.io/tutorials/</a>.</p>
18+
</body>

tools/builder/prepare-gh-pages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function getSteps(tutorialDir) {
6464

6565
copyFileSync(join(cwd, "README.md"), join(cwd, "dist/index.md"));
6666
rewriteLinks(join(cwd, "dist/index.md"));
67+
copyFileSync(join(cwd, "404.html"), join(cwd, "dist/404.html"));
6768

6869
console.log(` 🌅 Copying _includes....`);
6970
const includes = fg.globSync(["**/*"], { cwd: join(cwd, "_includes") });

0 commit comments

Comments
 (0)