mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 00:34:37 +00:00
feat: add a config option for a pageTitleSuffix (#1320)
* feat: add a config option for a pageTitleSuffix * Run Prettier on Head.tsx * Make pageTitleSuffix optional Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com> --------- Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
This commit is contained in:
@ -41,6 +41,7 @@ export type Analytics =
|
||||
|
||||
export interface GlobalConfiguration {
|
||||
pageTitle: string
|
||||
pageTitleSuffix?: string
|
||||
/** Whether to enable single-page-app style rendering. this prevents flashes of unstyled content and improves smoothness of Quartz */
|
||||
enableSPA: boolean
|
||||
/** Whether to display Wikipedia-style popovers when hovering over links */
|
||||
|
@ -6,7 +6,8 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } fro
|
||||
|
||||
export default (() => {
|
||||
const Head: QuartzComponent = ({ cfg, fileData, externalResources }: QuartzComponentProps) => {
|
||||
const title = fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title
|
||||
const title =
|
||||
(fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title) + cfg.pageTitleSuffix
|
||||
const description =
|
||||
fileData.description?.trim() ?? i18n(cfg.locale).propertyDefaults.description
|
||||
const { css, js } = externalResources
|
||||
|
Reference in New Issue
Block a user