diff --git a/next.config.ts b/next.config.ts index fd7c7e3..8c34ea8 100644 --- a/next.config.ts +++ b/next.config.ts @@ -15,6 +15,7 @@ const baseConfig: NextConfig = { poweredByHeader: false, reactStrictMode: true, reactCompiler: true, + trailingSlash: true, }; const withBundleAnalyzer = bundleAnalyzer({ @@ -23,7 +24,6 @@ const withBundleAnalyzer = bundleAnalyzer({ // Set up Nextra with its configuration const withNextra = nextra({ - defaultShowCopyCode: true, latex: true, contentDirBasePath: '/', }); diff --git a/package.json b/package.json index 5f46804..cbee212 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "next start", "lint": "eslint .", "lint:fix": "eslint . --fix", - "postbuild": "pagefind --site .next/server/app --output-path out/_pagefind" + "postbuild": "pagefind --site .next/server/app --output-path public/_pagefind && cp out/404/index.html out/404.html" }, "dependencies": { "@commitlint/cli": "^20.3.0", diff --git a/src/app/404/page.tsx b/src/app/404/page.tsx new file mode 100644 index 0000000..eb1ecb1 --- /dev/null +++ b/src/app/404/page.tsx @@ -0,0 +1,13 @@ +import NotFoundCanvas from '@/components/NotFoundCanvas'; + +export default function NotFound() { + return ( +
+

Page not found

+

Sorry, that page does not exist.

+
+ +
+
+ ); +} diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index eb1ecb1..138db02 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -1,13 +1,3 @@ -import NotFoundCanvas from '@/components/NotFoundCanvas'; +import NotFound from '@/app/404/page'; -export default function NotFound() { - return ( -
-

Page not found

-

Sorry, that page does not exist.

-
- -
-
- ); -} +export default NotFound; diff --git a/src/content/404.mdx b/src/content/404.mdx deleted file mode 100644 index accd4b1..0000000 --- a/src/content/404.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: page -permalink: /404.html ---- -# Page not found - -Sorry, that page does not exist. - -