Repository navigation
Expand file tree
/
Copy path404.html
More file actions
75 lines (68 loc) · 2.95 KB
/
Copy path404.html
File metadata and controls
75 lines (68 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Redirecting…</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<script>
// GitHub Pages serves this 404.html for any path under
// agenticstiger.github.io/* that doesn't match a real file.
// We use it as a soft-redirect to the project docs site.
//
// Behavior:
// /providers/snowflake → /forge_docs/providers/snowflake.html
// /cli/forge → /forge_docs/cli/forge.html
// /getting-started/ → /forge_docs/getting-started/
// /forge_docs/<anything-broken> → /forge_docs/ (real 404 inside docs)
// / → /forge_docs/
(function () {
var path = window.location.pathname;
var search = window.location.search || "";
var hash = window.location.hash || "";
// If the user already hit a /forge_docs/* path that 404'd, that's a
// genuine docs 404 — don't loop, just send them to the docs home.
if (path.indexOf("/forge_docs/") === 0) {
window.location.replace("/forge_docs/");
return;
}
// Strip leading slash, derive the rewritten path.
var stripped = path.replace(/^\/+/, "");
// If empty (the user hit the bare org root somehow), go to docs home.
if (!stripped) {
window.location.replace("/forge_docs/");
return;
}
// Heuristic: if the path looks like it's pointing at a doc page
// (no extension, or ends in .html, or ends in /), forward it under
// /forge_docs/. Otherwise (e.g. a binary asset) just go to the home.
var looksLikeDocPage =
/\/$/.test(path) ||
/\.html?$/i.test(path) ||
!/\.[a-z0-9]+$/i.test(path); // no extension at all
if (!looksLikeDocPage) {
window.location.replace("/forge_docs/");
return;
}
// Many docs links omit the trailing .html (VuePress clean URLs).
// If there's no extension and no trailing slash, add .html so the
// VuePress dist can resolve it.
if (!/\.[a-z0-9]+$/i.test(stripped) && !/\/$/.test(stripped)) {
stripped = stripped + ".html";
}
window.location.replace("/forge_docs/" + stripped + search + hash);
})();
</script>
<meta http-equiv="refresh" content="3; url=/forge_docs/">
<style>
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; max-width: 32rem; margin: 4rem auto; padding: 0 1.25rem; line-height: 1.6; color: #1a1a1a; }
code { background: #f4f4f4; padding: 0.1rem 0.3rem; border-radius: 0.2rem; }
a { color: #c2410c; }
</style>
</head>
<body>
<h1>Redirecting…</h1>
<p>The project documentation lives at <a href="/forge_docs/"><code>/forge_docs/</code></a>. Forwarding you there now.</p>
<p>If your browser doesn't redirect automatically, click <a href="/forge_docs/">here</a>.</p>
</body>
</html>