Skip to content

Commit 83e930a

Browse files
uhyoclaude
andauthored
Migrate docs from GitHub Pages to custom domain (#59)
* Change docs base path from /funstack-static/ to / for Cloudflare Pages migration - Update Vite base config from "/funstack-static/" to "/" - Update all hardcoded navigation links in Sidebar.tsx - Update OG image URLs to use relative paths instead of GitHub Pages URLs - Remove GitHub Pages SPA redirect hack from root.tsx and 404.html https://claude.ai/code/session_0184KJbjdLe57UYhwpVCyM5F * Update OG image URLs to use new Cloudflare Pages domain https://claude.ai/code/session_0184KJbjdLe57UYhwpVCyM5F --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a72c088 commit 83e930a

4 files changed

Lines changed: 16 additions & 105 deletions

File tree

packages/docs/public/404.html

Lines changed: 0 additions & 68 deletions
This file was deleted.

packages/docs/src/components/Sidebar/Sidebar.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export const navigation: NavSection[] = [
1414
{
1515
title: "Getting Started",
1616
items: [
17-
{ label: "Introduction", href: "/funstack-static/getting-started" },
17+
{ label: "Introduction", href: "/getting-started" },
1818
{
1919
label: "Migrating from Vite SPA",
20-
href: "/funstack-static/getting-started/migrating-from-vite-spa",
20+
href: "/getting-started/migrating-from-vite-spa",
2121
},
2222
],
2323
},
@@ -26,31 +26,31 @@ export const navigation: NavSection[] = [
2626
items: [
2727
{
2828
label: "React Server Components",
29-
href: "/funstack-static/learn/rsc",
29+
href: "/learn/rsc",
3030
},
3131
{
3232
label: "How It Works",
33-
href: "/funstack-static/learn/how-it-works",
33+
href: "/learn/how-it-works",
3434
},
3535
{
3636
label: "Optimizing RSC Payloads",
37-
href: "/funstack-static/learn/optimizing-payloads",
37+
href: "/learn/optimizing-payloads",
3838
},
3939
{
4040
label: "Using lazy() in Server",
41-
href: "/funstack-static/learn/lazy-server-components",
41+
href: "/learn/lazy-server-components",
4242
},
4343
{
4444
label: "Prefetching with Activity",
45-
href: "/funstack-static/learn/defer-and-activity",
45+
href: "/learn/defer-and-activity",
4646
},
4747
{
4848
label: "Multiple Entrypoints",
49-
href: "/funstack-static/learn/multiple-entrypoints",
49+
href: "/learn/multiple-entrypoints",
5050
},
5151
{
5252
label: "Server-Side Rendering",
53-
href: "/funstack-static/learn/ssr",
53+
href: "/learn/ssr",
5454
},
5555
],
5656
},
@@ -59,18 +59,18 @@ export const navigation: NavSection[] = [
5959
items: [
6060
{
6161
label: "funstackStatic()",
62-
href: "/funstack-static/api/funstack-static",
62+
href: "/api/funstack-static",
6363
},
64-
{ label: "defer()", href: "/funstack-static/api/defer" },
64+
{ label: "defer()", href: "/api/defer" },
6565
{
6666
label: "EntryDefinition",
67-
href: "/funstack-static/api/entry-definition",
67+
href: "/api/entry-definition",
6868
},
6969
],
7070
},
7171
{
7272
title: "Help",
73-
items: [{ label: "FAQ", href: "/funstack-static/faq" }],
73+
items: [{ label: "FAQ", href: "/faq" }],
7474
},
7575
];
7676

packages/docs/src/root.tsx

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Root({ children }: { children: React.ReactNode }) {
2121
/>
2222
<meta
2323
property="og:image"
24-
content="https://uhyo.github.io/funstack-static/FUNSTACK_Static_Hero_small.png"
24+
content="https://static.funstack.work/FUNSTACK_Static_Hero_small.png"
2525
/>
2626
{/* Twitter */}
2727
<meta name="twitter:card" content="summary_large_image" />
@@ -32,7 +32,7 @@ export default function Root({ children }: { children: React.ReactNode }) {
3232
/>
3333
<meta
3434
name="twitter:image"
35-
content="https://uhyo.github.io/funstack-static/FUNSTACK_Static_Hero_small.png"
35+
content="https://static.funstack.work/FUNSTACK_Static_Hero_small.png"
3636
/>
3737
<link rel="preconnect" href="https://fonts.googleapis.com" />
3838
<link
@@ -44,27 +44,6 @@ export default function Root({ children }: { children: React.ReactNode }) {
4444
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
4545
rel="stylesheet"
4646
/>
47-
<script>
48-
{`
49-
// GitHub Pages SPA redirect hack - restore URL from query params
50-
// See: https://github.com/rafgraph/spa-github-pages
51-
(function (l) {
52-
if (l.search[1] === "p") {
53-
var decoded = decodeURIComponent(l.search.slice(3))
54-
.split("&")
55-
.map(function (s) {
56-
return s.replace(/~and~/g, "&");
57-
})
58-
.join("?");
59-
window.history.replaceState(
60-
null,
61-
"",
62-
l.pathname.slice(0, -1) + "/" + decoded + l.hash,
63-
);
64-
}
65-
})(window.location);
66-
`}
67-
</script>
6847
</head>
6948
<body>{children}</body>
7049
</html>

packages/docs/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default lazy(() => import("${id}?lazy"));
4646
},
4747
react({ include: /\.(jsx|js|mdx|md|tsx|ts)$/ }),
4848
],
49-
base: "/funstack-static/",
49+
base: "/",
5050
};
5151
return config;
5252
});

0 commit comments

Comments
 (0)