- Slugify tag/category static params so pre-rendered pages match links; disable dynamic params and return a real 404 via notFound() - Drop bogus generateStaticParams from the tags/categories index pages - Add a styled not-found page - Sort 'Recently updated' by last modification before slicing - Atom feed: correct rel=self URL, use updated dates, valid content type - Swap no-js -> js class in an inline head script before first paint - Markdown links: only route internal paths through next/link and tolerate missing hrefs
16 lines
565 B
TypeScript
16 lines
565 B
TypeScript
import Link from 'next/link'
|
|
|
|
export default function NotFound() {
|
|
return (
|
|
<main className="max-w-3xl 2xl:max-w-4xl mx-auto px-4 py-8 mb-8 lg:py-16 w-full">
|
|
<div className="font-mono text-sm text-fg-dim mb-2">~/404</div>
|
|
<h1 className="text-4xl font-bold mb-4">Page not found</h1>
|
|
<p className="text-fg-dim mb-6">
|
|
Whatever you were looking for isn't here. It may have moved, or never existed.
|
|
</p>
|
|
<Link href="/" className="text-accent hover:underline">
|
|
Back to the homepage
|
|
</Link>
|
|
</main>
|
|
)
|
|
}
|