From c2bea8a4c4aeba440b8a7b043d7ece6343a9d263 Mon Sep 17 00:00:00 2001
From: derfalx <kschneider@falx.tech>
Date: Thu, 08 Jan 2026 01:30:42 +0000
Subject: [PATCH] fix(citation): Language parameter for non en-US settings (#2075)

---
 quartz/components/pages/404.tsx |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/quartz/components/pages/404.tsx b/quartz/components/pages/404.tsx
index 56adbf9..63da2c8 100644
--- a/quartz/components/pages/404.tsx
+++ b/quartz/components/pages/404.tsx
@@ -1,11 +1,16 @@
-import { i18n } from "../../i18n/i18next"
-import { QuartzComponentConstructor, QuartzComponentProps } from "../types"
+import { i18n } from "../../i18n"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
 
-function NotFound({ cfg }: QuartzComponentProps) {
+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>{i18n(cfg.locale, "404")}</p>
+      <p>{i18n(cfg.locale).pages.error.notFound}</p>
+      <a href={baseDir}>{i18n(cfg.locale).pages.error.home}</a>
     </article>
   )
 }

--
Gitblit v1.10.0