One-liner: Quartz 5 turns Markdown, Obsidian-style knowledge, local plugin forks, and YAML layout rules into a fast static SSOT site. Treat it as a compiler pipeline, not a CMS.
flowchart LR A[๐ content/<br/>Markdown vault] --> B[๐ง transformers<br/>AST + metadata] B --> C[๐งน filters<br/>publish gate] C --> D[๐ page emitters<br/>routes/html] D --> E[๐งฉ layout/components<br/>sidebars/search] E --> F[๐ public/<br/>deployable site]
1. โก Quick Start
| Goal | Command | Use When |
|---|---|---|
| Install deps | npm install | Fresh clone or dependency drift |
| Restore plugins | npx quartz plugin install --from-config | Config changed or clone missing plugin deps |
| Preview site | npx quartz build --serve | Local edit loop |
| Build site | npx quartz build | Production static output |
| Type/format gate | npm run check | Before publishing code/config changes |
| Test core | npm test | After compiler/plugin source changes |
| Deploy SSOT | ~/deploy.sh | Publish ssot.0rk.de |
Runtime invariant: Node >=22, npm >=10.9.2. If deploy breaks mysteriously, check runtime versions first.
2. ๐ง Mental Model
- Quartz is a compiler: input files become typed virtual files, then rendered pages, indexes, assets, and metadata.
- Content lives in
content/: Markdown, folder notes, canvas files, bases, assets, and index pages are the source of truth. - Config is declarative-first:
quartz.config.yamldeclares plugins, theme, layout, and site behavior. quartz.tsis the escape hatch: use it only for programmatic config loading/merging and advanced logic.- Plugins are contracts: transformers parse/annotate, filters discard, emitters write outputs, component plugins place UI.
- Local forks are vendored plugins: source under
quartz/local-plugins/<name>/; committeddist/is required.
3. ๐งญ File Map
| Path | Job |
|---|---|
content/index.md | Homepage and top-level navigation |
content/knowledge/ | Distilled know-how and cheat sheets |
content/stack/ | Stack-specific operating references |
content/skills/gurus/ | Specialist operating manuals |
quartz.config.yaml | Site config, plugins, theme, layout |
quartz.ts | Loads YAML config/layout into Quartz runtime |
quartz/styles/custom.scss | Site-wide CSS overrides |
quartz/local-plugins/ | Local plugin forks with committed builds |
public/ | Generated output; do not hand-edit |
4. ๐งฉ Pipeline
๐ง Transformers
They parse and enrich content before pages exist.
obsidian-flavored-markdownโ wikilinks, callouts, embeds, checkboxes.github-flavored-markdownโ tables, strikethrough, task lists, autolinks.frontmatter-style metadata comes through YAML delimiters.crawl-linksโ internal link resolution.descriptionโ SEO/meta summaries.latexโ KaTeX math.note-propertiesโ selected frontmatter display.
๐งน Filters
They decide what survives the build.
remove-draftexcludesdraft: true.unlisted-pageskeeps pages out of indexes/feeds while still building them.explicit-publishexists but is disabled here; do not assumepublish: trueis required.
๐ Page Emitters
They materialize routes.
content-pageโ normal Markdown pages.folder-pageโ folder index/list pages.tag-pageโ tag landing pages.canvas-pageโ Obsidian.canvaspages.bases-pageโ Obsidian Bases-style views.
๐งฑ Asset/Index Emitters
They emit site infrastructure.
content-indexโ RSS + sitemap.searchโ Pagefind-powered search UI.graphโ backlink graph.alias-redirectsโ redirect stubs fromaliases.cnameโ custom domain marker.og-imageโ social preview images.
5. ๐๏ธ Config Rules
configuration:
pageTitle: "0rk SSOT"
baseUrl: ssot.0rk.de
enableSPA: true
enablePopovers: true
plugins:
- source: github:quartz-community/example
enabled: true
options: {} # plugin-specific config lives here
layout: # visual components only
position: right
priority: 10Idiot-proof config checklist:
- Put plugin options under
options:or Quartz may ignore them. - Use
layout.positiononly for component placement:left,right,beforeBody,afterBody,body,footer. - Use higher
layout.priorityto render earlier/higher within a region. - Keep
baseUrl: ssot.0rk.de; feeds and canonical URLs depend on it. - Keep
ignorePatternsfor private/templates/editor folders. - Never hand-edit
public/; rebuild instead.
6. ๐ผ๏ธ Layout
Page type โ layout.byPageType override โ component layout rules โ rendered frame- Global groups:
layout.groups.toolbardefines shared grouped component behavior. - Page type overrides:
layout.byPageType.folder/tagcan exclude TOC/backlinks/reader mode. - Responsive display: plugins can use
display: all,desktop-only, ormobile-only. - Folder labels: folder
index.mdfrontmattertitlebecomes the Explorer label. - 404 pages: strip sidebars by overriding
beforeBody,left, andright.
7. ๐งพ Content Rules
---
title: "๐ชจ Quartz 5 Masterclass"
description: "Short, search-friendly summary."
tags:
- quartz
- cheatsheet
aliases:
- old-page-name
---- Use
title,description,tags, andaliasesdeliberately. - Date keys are only
created,modified,published; avoid fakemodifiedbecause git supplies it. - Use
aliaseswhen moving pages so redirect stubs preserve inbound links. - Link files by shortest useful wiki path:
[[quartz5]],[[QuartzGuru]],[[knowledge/cheatsheets|Cheat Sheets]]. - Link folders by folder path, not hidden implementation files:
[[skills/gurus|Skill Docs]]. - Keep one clear H1 matching the page intent.
8. ๐ชป Obsidian Parity
- Wikilinks:
[[Target]], alias wikilinks, and anchors are handled by Obsidian-flavored Markdown. - Callouts: native Obsidian callout blocks, including expanded/collapsed variants.
- Tasks: checkboxes and task metadata through Markdown plugins.
- Canvas:
.canvasfiles render via localcanvas-page. - Bases:
.basefiles render viabases-page. - Backlinks:
backlinkscomponent renders in the right sidebar. - Search: Pagefind search overlay.
- Graph: desktop graph component in the left sidebar.
Rule: Obsidian syntax is supported where configured, but static publishing wins. Anything requiring live Obsidian plugins must be precompiled or represented as static content.
9. ๐ Local Plugins
flowchart LR Source["quartz/local-plugins/name"] -->|"source: ./quartz/local-plugins/name"| Config["quartz.config.yaml"] Source -->|"npm install && npm run build"| Dist["dist committed"] Config -->|"loader reads plugin"| Build["npx quartz build"] Dist --> Build
Fork recipe:
- Copy plugin source into
quartz/local-plugins/<name>/. - Point
source:at./quartz/local-plugins/<name>. - Build inside the plugin directory.
- Commit
dist/. - Configure using the directory basename as the option key.
Never edit plugin dist/ by hand. Edit source, rebuild, commit the generated output.
10. ๐ Deploy
npm install
โ npx quartz plugin install --from-config
โ npm run check
โ npx quartz build
โ node generate-llmstxt.js
โ ~/deploy.shProduction assumptions:
- Output directory is
public/. - Domain is
ssot.0rk.de. - Clean URL hosting needs an
.htmlfallback:
location / {
try_files $uri $uri/ $uri.html =404;
}11. ๐งช Debug Fast
| Symptom | First Check | Likely Fix |
|---|---|---|
| Build fails on CI | Node/npm version | Use Node 22+ / npm 10.9.2+ |
| Plugin missing | Plugin install state | npx quartz plugin install --from-config |
| Options ignored | YAML nesting | Move settings under options: |
| Page missing | Draft/unlisted/filter | Check draft, unlisted, plugin filters |
| Bad links | Link resolution | Prefer shortest wikilinks or clean relative Markdown |
| 404 on clean URL | Web server fallback | Add $uri.html fallback |
| Local plugin works only locally | Missing committed dist/ | Build plugin and commit output |
| Theme breaks in dark mode | Hardcoded styles | Move theme-aware CSS to custom.scss variables |
12. ๐ก๏ธ Hard Rules
- โ
Keep source of truth in
content/, not generatedpublic/. - โ Use YAML config for declarative behavior; use TypeScript only when YAML cannot express it.
- โ
Build and commit local plugin
dist/. - โ Keep docs high-density, linked, and frontmatter-complete.
- โ Preserve aliases when moving content.
- โ
Verify with
npm run checkfor code/config changes andnpx quartz buildfor publish readiness. - โ Do not fake dates.
- โ Do not bury plugin config outside
options:. - โ Do not add Mermaid init theme directives; let site theme handle rendering.
- โ Do not assume Obsidian-only live plugins work on the static site.
13. ๐ Canon
- ๐ชจ Quartz 5 Reference โ detailed stack reference.
- โ Quartz5 Checklist โ live plugin registry and enabled status.
- ๐ชจ QuartzGuru โ 0rk-specific operating manual.
- ๐ SSOT Bible โ global SSOT rules and invariants.