From 848610768ff2ed98bdc372ddb0ed4a57c01cea8d Mon Sep 17 00:00:00 2001 From: Guanzhou Song Date: Thu, 30 Jul 2026 12:39:56 -0400 Subject: [PATCH] Add a branded 404 page Unknown URLs currently land on the unbranded Next.js default 404 (a bare 'This page could not be found'). With the static export, a root app/not-found.tsx is emitted as out/404.html, which GitHub Pages serves for any unknown path. The new page matches the site's dark styling and routes visitors to the places a lost visitor most likely wants: docs, downloads, samples, home, and an issue link for reporting broken links. --- app/not-found.tsx | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 app/not-found.tsx diff --git a/app/not-found.tsx b/app/not-found.tsx new file mode 100644 index 0000000..cfe6ef2 --- /dev/null +++ b/app/not-found.tsx @@ -0,0 +1,68 @@ +import Link from "next/link"; + +const suggestions = [ + { + title: "Documentation", + description: "Guides, quick starts, and the MQL reference.", + href: "/docs", + }, + { + title: "Download", + description: "Docker, APT, and RPM install commands.", + href: "/packages", + }, + { + title: "Samples", + description: "Ready-to-run example applications.", + href: "/samples", + }, +] as const; + +export default function NotFound() { + return ( +
+

+ 404 - Page not found +

+

+ This page doesn't exist +

+

+ The page you're looking for may have moved. These are the most + useful places to continue from. +

+ +
+ {suggestions.map((item) => ( + +

+ {item.title} +

+

{item.description}

+ + ))} +
+ +
+ + Back to home + + + Report a broken link + +
+
+ ); +}