diff --git a/packages/docs/public/robots.txt b/packages/docs/public/robots.txt
new file mode 100644
index 0000000..538d6b8
--- /dev/null
+++ b/packages/docs/public/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Allow: /
+
+Sitemap: https://static.funstack.work/sitemap.xml
diff --git a/packages/docs/public/sitemap.xml b/packages/docs/public/sitemap.xml
new file mode 100644
index 0000000..3ff7374
--- /dev/null
+++ b/packages/docs/public/sitemap.xml
@@ -0,0 +1,48 @@
+
+
+
+ https://static.funstack.work/
+
+
+ https://static.funstack.work/getting-started
+
+
+ https://static.funstack.work/getting-started/migrating-from-vite-spa
+
+
+ https://static.funstack.work/faq
+
+
+ https://static.funstack.work/api/funstack-static
+
+
+ https://static.funstack.work/api/defer
+
+
+ https://static.funstack.work/api/entry-definition
+
+
+ https://static.funstack.work/learn/how-it-works
+
+
+ https://static.funstack.work/learn/rsc
+
+
+ https://static.funstack.work/learn/optimizing-payloads
+
+
+ https://static.funstack.work/learn/lazy-server-components
+
+
+ https://static.funstack.work/learn/defer-and-activity
+
+
+ https://static.funstack.work/learn/file-system-routing
+
+
+ https://static.funstack.work/advanced/multiple-entrypoints
+
+
+ https://static.funstack.work/advanced/ssr
+
+
diff --git a/packages/docs/src/entries.tsx b/packages/docs/src/entries.tsx
index 3b5bb56..b4c5e3d 100644
--- a/packages/docs/src/entries.tsx
+++ b/packages/docs/src/entries.tsx
@@ -20,9 +20,16 @@ function pathToEntryPath(path: string): string {
}
export default function getEntries(): EntryDefinition[] {
- return collectPaths(routes).map((pathname) => ({
+ const entries = collectPaths(routes).map((pathname) => ({
path: pathToEntryPath(pathname),
root: () => import("./root"),
app: ,
}));
+ // Generate a 404.html so Cloudflare can serve it with a proper 404 status
+ entries.push({
+ path: "404.html",
+ root: () => import("./root"),
+ app: ,
+ });
+ return entries;
}
diff --git a/packages/docs/wrangler.toml b/packages/docs/wrangler.toml
index c9a54ab..74cf314 100644
--- a/packages/docs/wrangler.toml
+++ b/packages/docs/wrangler.toml
@@ -5,4 +5,4 @@ compatibility_date = "2026-02-18"
[assets]
directory = "./dist/public"
-not_found_handling = "single-page-application"
+not_found_handling = "404-page"