fix: use correct baseurl in serve mode
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
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 NotFound: QuartzComponent = ({ cfg, ctx }: QuartzComponentProps) => {
|
||||
const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`)
|
||||
const baseDir = url.pathname
|
||||
const baseDir = ctx.argv.serve ? "/" : url.pathname
|
||||
|
||||
return (
|
||||
<article class="popover-hint">
|
||||
|
||||
Reference in New Issue
Block a user