base path refactor to better support subpath hosting
This commit is contained in:
parent
3201f83b70
commit
c874e7e937
29 changed files with 257 additions and 389 deletions
|
@ -1,10 +1,9 @@
|
|||
import { canonicalizeServer, pathToRoot } from "../util/path"
|
||||
import { pathToRoot } from "../util/path"
|
||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
|
||||
function PageTitle({ fileData, cfg }: QuartzComponentProps) {
|
||||
const title = cfg?.pageTitle ?? "Untitled Quartz"
|
||||
const slug = canonicalizeServer(fileData.slug!)
|
||||
const baseDir = pathToRoot(slug)
|
||||
const baseDir = pathToRoot(fileData.slug!)
|
||||
return (
|
||||
<h1 class="page-title">
|
||||
<a href={baseDir}>{title}</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue