From 9aa6a18be2eae0d84c7897470a46ede19d5ac191 Mon Sep 17 00:00:00 2001
From: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Date: Thu, 01 Feb 2024 20:56:42 +0000
Subject: [PATCH] fix(search): improve more general usability (closes #781) (#782)
---
quartz/components/ArticleTitle.tsx | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/quartz/components/ArticleTitle.tsx b/quartz/components/ArticleTitle.tsx
index c25769e..2484c94 100644
--- a/quartz/components/ArticleTitle.tsx
+++ b/quartz/components/ArticleTitle.tsx
@@ -1,10 +1,10 @@
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
-function ArticleTitle({ fileData }: QuartzComponentProps) {
+function ArticleTitle({ fileData, displayClass }: 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={classNames(displayClass, "article-title")}>{title}</h1>
} else {
return null
}
--
Gitblit v1.10.0