various polish

This commit is contained in:
Jacky Zhao 2023-07-02 13:08:29 -07:00
parent 4c904d88ab
commit e0ebee5aa9
30 changed files with 339 additions and 190 deletions
quartz/components

View file

@ -2,9 +2,8 @@ import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
function ArticleTitle({ fileData }: QuartzComponentProps) {
const title = fileData.frontmatter?.title
const displayTitle = fileData.slug === "index" ? undefined : title
if (displayTitle) {
return <h1 class="article-title">{displayTitle}</h1>
if (title) {
return <h1 class="article-title">{title}</h1>
} else {
return null
}