From c538c151c7462ad0395ff2c15c5e11e89e362aa8 Mon Sep 17 00:00:00 2001
From: Striven <sg.striven@cutecat.club>
Date: Sat, 04 Apr 2026 19:47:16 +0000
Subject: [PATCH] Initial commit
---
quartz/components/pages/404.tsx | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/quartz/components/pages/404.tsx b/quartz/components/pages/404.tsx
index c276f56..63da2c8 100644
--- a/quartz/components/pages/404.tsx
+++ b/quartz/components/pages/404.tsx
@@ -1,10 +1,16 @@
-import { QuartzComponentConstructor } from "../types"
+import { i18n } from "../../i18n"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
-function NotFound() {
+const NotFound: QuartzComponent = ({ cfg }: QuartzComponentProps) => {
+ // If baseUrl contains a pathname after the domain, use this as the home link
+ const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`)
+ const baseDir = url.pathname
+
return (
<article class="popover-hint">
<h1>404</h1>
- <p>Either this page is private or doesn't exist.</p>
+ <p>{i18n(cfg.locale).pages.error.notFound}</p>
+ <a href={baseDir}>{i18n(cfg.locale).pages.error.home}</a>
</article>
)
}
--
Gitblit v1.10.0