AetheriaLore/quartz-site/quartz/components/pages/404.tsx
Meta Vens 6127440e57 Static Wiki Site via Quartz
Included the static site generator Quartz and customized it to generate a wiki using the contents of the Obsidian Vault
2026-04-19 09:47:46 +01:00

18 lines
649 B
TypeScript

import { i18n } from "../../i18n"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
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>
)
}
export default (() => NotFound) satisfies QuartzComponentConstructor