toc
This commit is contained in:
11
quartz/components/ArticleTitle.tsx
Normal file
11
quartz/components/ArticleTitle.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import { QuartzComponentProps } from "./types"
|
||||
|
||||
export default function ArticleTitle({ fileData }: QuartzComponentProps) {
|
||||
const title = fileData.frontmatter?.title
|
||||
const displayTitle = fileData.slug === "index" ? undefined : title
|
||||
if (displayTitle) {
|
||||
return <h1>{displayTitle}</h1>
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user