wiki/quartz/components/PageTitle.tsx

10 lines
303 B
TypeScript
Raw Normal View History

2023-06-08 05:27:32 +00:00
import { resolveToRoot } from "../path"
import { QuartzComponentProps } from "./types"
export default function({ cfg, fileData }: QuartzComponentProps) {
const title = cfg.siteTitle
const slug = fileData.slug!
const baseDir = resolveToRoot(slug)
return <h1><a href={baseDir}>{title}</a></h1>
}