mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-21 23:32:12 +00:00
toc
This commit is contained in:
parent
3a29f4c86e
commit
b8c011410d
21 changed files with 233 additions and 66 deletions
quartz/components
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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue