Overview
quartz.config.ts is the single file that controls every Quartz build. It exports one QuartzConfig object with two top-level keys: configuration and plugins. Get configuration right once; iterate plugins as the site grows. This page walks each field with the reasoning behind the defaults.
Set baseUrl to the bare domain, no protocol
baseUrl is the most consequential field in the file. Quartz uses it to build canonical URLs, RSS feed links, the sitemap, and the value written by Plugin.CNAME(). A wrong value breaks SEO and the custom-domain wiring silently.
configuration: {
baseUrl: "llmbestpractices.com", // bare domain, no https://, no trailing slash
}Quartz prepends https:// automatically. Do not include a path segment unless the site lives at a subpath. For the GitHub Pages subpath case (user.github.io/repo), set baseUrl to user.github.io/repo.
Use ignorePatterns to keep private files out of the build
ignorePatterns is a list of glob patterns applied against content/. Anything that matches is excluded from the build output.
ignorePatterns: ["private", "templates", ".obsidian"],privateexcludes the entirecontent/private/folder. Put daily notes, scratch pages, and anything not ready for public view there.templatesexcludes Obsidian template files that are not pages..obsidianexcludes the vault config directory.
Add patterns early. Forgetting private ships draft pages. See obsidian for the matching vault layout.
Choose defaultDateType based on how the site shows dates
Three options exist: "created", "modified", "published". Set "modified" for reference vaults where pages are updated over time. Set "created" only when the publication date is more meaningful than the last edit.
defaultDateType: "modified",Plugin.CreatedModifiedDate reads this field. When priority: ["frontmatter", "git"] is set on that plugin, the last_updated frontmatter field overrides the git history date. Prefer frontmatter control over git blame; git history is brittle across squash merges.
Configure the theme object for visual consistency
The theme object sets font stacks, accent color, and light/dark background values. All fields have defaults; override only what diverges from the defaults.
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: "#84a98c",
highlight: "rgba(143, 159, 169, 0.15)",
},
darkMode: { /* mirror with dark equivalents */ },
},
},Set cdnCaching: true in production so fonts are served from the Google CDN with aggressive cache headers. Set fontOrigin: "localFonts" only when the site must work offline or when the privacy posture disallows external font requests. See quartz-layout for how the theme values flow into the layout system.
Keep pageTitle short, use pageTitleSuffix for the full name
pageTitle appears in the browser tab and the top-level navigation. Keep it to one or two words. If the site name is long, set pageTitleSuffix separately so <title> tags read Page Name | Site Name.
pageTitle: "llmbestpractices",
pageTitleSuffix: " | LLM Best Practices",Keep the full config type-safe
quartz.config.ts is typed TypeScript. Import QuartzConfig from ./quartz/cfg and annotate the export.
import { QuartzConfig } from "./quartz/cfg"
const config: QuartzConfig = {
configuration: { /* ... */ },
plugins: { /* ... */ },
}
export default configThe type catches missing required fields and unknown keys at build time, not at runtime. Run npx tsc --noEmit before committing to catch type errors without emitting output. See quartz-plugins for the plugins object and quartz-layout for the layout system that consumes the theme.