From 3a74411c287193b66bb979fe57083a975e52f727 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Tue, 15 Sep 2026 17:02:36 +0800 Subject: [PATCH] feat(site): add self-contained static 404 page --- docs/app/not-found.tsx | 52 ++++++++++++++++++++++++++++++++++++++++++ docs/wrangler.json | 3 ++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 docs/app/not-found.tsx diff --git a/docs/app/not-found.tsx b/docs/app/not-found.tsx new file mode 100644 index 0000000000..78909f252a --- /dev/null +++ b/docs/app/not-found.tsx @@ -0,0 +1,52 @@ +// Self-contained static 404: the top-level not-found has no root layout in this +// app (multiple root-layout groups), so global.css is not guaranteed to load — +// especially in `next dev`. Keep all styling inline and use zero client JS. +const button = { + display: "inline-flex", + height: "40px", + alignItems: "center", + padding: "0 18px", + borderRadius: "8px", + fontSize: "13px", + fontWeight: 650, + textDecoration: "none", +} as const; + +export default function NotFound() { + return ( +
+ {/* No root layout on this route, so global.css may be absent (next dev): + reset the default body margin/background inline instead. */} +