mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-10 15:33:39 +00:00
generic quartz component for layout
This commit is contained in:
parent
dde36fa558
commit
317cce9314
11 changed files with 77 additions and 58 deletions
quartz/components
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>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue