From 3968b850c2518f7b303adcc9e966a079423abde5 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 10 Jun 2024 20:57:08 +0000
Subject: [PATCH] chore(deps): bump @floating-ui/dom from 1.6.3 to 1.6.5 (#1196)

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

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

--
Gitblit v1.10.0