quartz/quartz.config.ts
saberzero1 83a007022d
refactor: remove built-in FrontMatter transformer
Frontmatter processing is now handled by the note-properties plugin,
which provides the same YAML/TOML parsing plus link extraction and
a visual properties panel. The built-in transformer is no longer needed.
2026-02-22 23:42:35 +01:00

139 lines
4.4 KiB
TypeScript

import { QuartzConfig } from "./quartz/cfg"
import * as Plugin from "./quartz/plugins"
import * as ExternalPlugin from "./.quartz/plugins"
import { layout } from "./quartz.layout"
const config: QuartzConfig = {
configuration: {
pageTitle: "Quartz 5",
pageTitleSuffix: "",
enableSPA: true,
enablePopovers: true,
analytics: {
provider: "plausible",
},
locale: "en-US",
baseUrl: "quartz.jzhao.xyz",
ignorePatterns: ["private", "templates", ".obsidian"],
defaultDateType: "modified",
theme: {
fontOrigin: "googleFonts",
cdnCaching: true,
typography: {
header: "Schibsted Grotesk",
body: "Source Sans Pro",
code: "IBM Plex Mono",
},
colors: {
lightMode: {
light: "#faf8f8",
lightgray: "#e5e5e5",
gray: "#b8b8b8",
darkgray: "#4e4e4e",
dark: "#2b2b2b",
secondary: "#284b63",
tertiary: "#84a59d",
highlight: "rgba(143, 159, 169, 0.15)",
textHighlight: "#fff23688",
},
darkMode: {
light: "#161618",
lightgray: "#393639",
gray: "#646464",
darkgray: "#d4d4d4",
dark: "#ebebec",
secondary: "#7b97aa",
tertiary: "#84a59d",
highlight: "rgba(143, 159, 169, 0.15)",
textHighlight: "#b3aa0288",
},
},
},
},
plugins: {
transformers: [
// FrontMatter processing now handled by note-properties plugin (via quartz.config.yaml)
ExternalPlugin.CreatedModifiedDate({
priority: ["frontmatter", "git", "filesystem"],
}),
ExternalPlugin.SyntaxHighlighting({
theme: {
light: "github-light",
dark: "github-dark",
},
keepBackground: false,
}),
ExternalPlugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false, enableCheckbox: true }),
ExternalPlugin.GitHubFlavoredMarkdown(),
ExternalPlugin.TableOfContentsTransformer(),
ExternalPlugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
ExternalPlugin.Description(),
ExternalPlugin.Latex({ renderEngine: "katex" }),
],
filters: [ExternalPlugin.RemoveDrafts()],
emitters: [
ExternalPlugin.AliasRedirects(),
Plugin.ComponentResources(),
ExternalPlugin.ContentIndex({
enableSiteMap: true,
enableRSS: true,
}),
Plugin.Assets(),
Plugin.Static(),
ExternalPlugin.Favicon(),
Plugin.PageTypes.PageTypeDispatcher({
defaults: layout.defaults,
byPageType: layout.byPageType,
}),
ExternalPlugin.CustomOgImages(),
ExternalPlugin.CNAME(),
],
pageTypes: [
ExternalPlugin.CanvasPage(),
ExternalPlugin.ContentPage(),
ExternalPlugin.FolderPage(),
ExternalPlugin.TagPage(),
Plugin.PageTypes.NotFoundPageType(),
],
},
externalPlugins: [
"github:quartz-community/explorer",
"github:quartz-community/graph",
"github:quartz-community/search",
"github:quartz-community/table-of-contents",
"github:quartz-community/backlinks",
"github:quartz-community/comments",
"github:quartz-community/article-title",
"github:quartz-community/tag-list",
"github:quartz-community/page-title",
"github:quartz-community/darkmode",
"github:quartz-community/reader-mode",
"github:quartz-community/content-meta",
"github:quartz-community/footer",
"github:quartz-community/content-page",
"github:quartz-community/folder-page",
"github:quartz-community/tag-page",
"github:quartz-community/latex",
"github:quartz-community/created-modified-date",
"github:quartz-community/syntax-highlighting",
"github:quartz-community/obsidian-flavored-markdown",
"github:quartz-community/github-flavored-markdown",
"github:quartz-community/crawl-links",
"github:quartz-community/description",
"github:quartz-community/hard-line-breaks",
"github:quartz-community/citations",
"github:quartz-community/ox-hugo",
"github:quartz-community/roam",
"github:quartz-community/remove-draft",
"github:quartz-community/explicit-publish",
"github:quartz-community/alias-redirects",
"github:quartz-community/cname",
"github:quartz-community/favicon",
"github:quartz-community/content-index",
"github:quartz-community/og-image",
"github:quartz-community/canvas-page",
],
}
export default config