chore(title): only append titleSuffix if not index page

This commit is contained in:
Aaron Pham 2024-10-16 17:43:22 -04:00 committed by GitHub
parent b3a02909ba
commit 68f0fdee99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } fro
export default (() => { export default (() => {
const Head: QuartzComponent = ({ cfg, fileData, externalResources }: QuartzComponentProps) => { const Head: QuartzComponent = ({ cfg, fileData, externalResources }: QuartzComponentProps) => {
const titleSuffix = cfg.pageTitleSuffix ?? "" const titleSuffix = fileData.slug !== "index" ? (cfg.pageTitleSuffix ?? "") : ""
const title = const title =
(fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title) + titleSuffix (fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title) + titleSuffix
const description = const description =