generic quartz component for layout
This commit is contained in:
9
quartz/components/PageTitle.tsx
Normal file
9
quartz/components/PageTitle.tsx
Normal file
@ -0,0 +1,9 @@
|
||||
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>
|
||||
}
|
Reference in New Issue
Block a user