diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-01-12 19:44:19 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-01-12 21:37:23 +0900 |
| commit | 940eae61767214eb1ee573284dc8b5876d536fb3 (patch) | |
| tree | ed82c51e568eea064b530e815f12bd2fc701eef6 /vhosts/blog/nuldoc-src/pages/not_found.tsx | |
| parent | 98abcc023b99898f3a7e182e2330ea809a4c99e2 (diff) | |
| download | nsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.tar.gz nsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.tar.zst nsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.zip | |
refactor(blog/nuldoc): convert pages/*.ts to TSX
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/not_found.tsx')
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/not_found.tsx | 39 |
1 files changed, 39 insertions, 0 deletions
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", + }; +} |
