From 940eae61767214eb1ee573284dc8b5876d536fb3 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 12 Jan 2025 19:44:19 +0900
Subject: refactor(blog/nuldoc): convert pages/*.ts to TSX

---
 vhosts/blog/nuldoc-src/pages/not_found.tsx | 39 ++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 vhosts/blog/nuldoc-src/pages/not_found.tsx

(limited to 'vhosts/blog/nuldoc-src/pages/not_found.tsx')

diff --git a/vhosts/blog/nuldoc-src/pages/not_found.tsx b/vhosts/blog/nuldoc-src/pages/not_found.tsx
new file mode 100644
index 00000000..f0b5f964
--- /dev/null
+++ b/vhosts/blog/nuldoc-src/pages/not_found.tsx
@@ -0,0 +1,39 @@
+import GlobalFooter from "../components/GlobalFooter.tsx";
+import { renderToDOM } from "../jsx/render.ts";
+import GlobalHeader from "../components/GlobalHeader.tsx";
+import PageLayout from "../components/PageLayout.tsx";
+import { Config } from "../config.ts";
+import { el } from "../dom.ts";
+import { Page } from "../page.ts";
+
+export type NotFoundPage = Page;
+
+export async function generateNotFoundPage(
+  config: Config,
+): Promise<NotFoundPage> {
+  const html = await renderToDOM(
+    <PageLayout
+      metaCopyrightYear={config.blog.siteCopyrightYear}
+      metaDescription="リクエストされたページが見つかりません"
+      metaTitle={`Page Not Found｜${config.blog.siteName}`}
+      config={config}
+    >
+      <body className="single">
+        <GlobalHeader config={config} />
+        <main className="main">
+          <article>
+            <div className="not-found">404</div>
+          </article>
+        </main>
+        <GlobalFooter config={config} />
+      </body>
+    </PageLayout>,
+  );
+
+  return {
+    root: el("__root__", {}, html),
+    renderer: "html",
+    destFilePath: "/404.html",
+    href: "/404.html",
+  };
+}
-- 
cgit v1.2.3-70-g09d2

