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

GoalCommandUse When
Install depsnpm installFresh clone or dependency drift
Restore pluginsnpx quartz plugin install --from-configConfig changed or clone missing plugin deps
Preview sitenpx quartz build --serveLocal edit loop
Build sitenpx quartz buildProduction static output
Type/format gatenpm run checkBefore publishing code/config changes
Test corenpm testAfter compiler/plugin source changes
Deploy SSOT~/deploy.shPublish 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.yaml declares plugins, theme, layout, and site behavior.
  • quartz.ts is 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>/; committed dist/ is required.

3. ๐Ÿงญ File Map

PathJob
content/index.mdHomepage 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.yamlSite config, plugins, theme, layout
quartz.tsLoads YAML config/layout into Quartz runtime
quartz/styles/custom.scssSite-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-draft excludes draft: true.
  • unlisted-pages keeps pages out of indexes/feeds while still building them.
  • explicit-publish exists but is disabled here; do not assume publish: true is 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 .canvas pages.
  • 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 from aliases.
  • 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: 10

Idiot-proof config checklist:

  • Put plugin options under options: or Quartz may ignore them.
  • Use layout.position only for component placement: left, right, beforeBody, afterBody, body, footer.
  • Use higher layout.priority to render earlier/higher within a region.
  • Keep baseUrl: ssot.0rk.de; feeds and canonical URLs depend on it.
  • Keep ignorePatterns for 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.toolbar defines shared grouped component behavior.
  • Page type overrides: layout.byPageType.folder/tag can exclude TOC/backlinks/reader mode.
  • Responsive display: plugins can use display: all, desktop-only, or mobile-only.
  • Folder labels: folder index.md frontmatter title becomes the Explorer label.
  • 404 pages: strip sidebars by overriding beforeBody, left, and right.

7. ๐Ÿงพ Content Rules

---
title: "๐Ÿชจ Quartz 5 Masterclass"
description: "Short, search-friendly summary."
tags:
  - quartz
  - cheatsheet
aliases:
  - old-page-name
---
  • Use title, description, tags, and aliases deliberately.
  • Date keys are only created, modified, published; avoid fake modified because git supplies it.
  • Use aliases when 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: .canvas files render via local canvas-page.
  • Bases: .base files render via bases-page.
  • Backlinks: backlinks component 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:

  1. Copy plugin source into quartz/local-plugins/<name>/.
  2. Point source: at ./quartz/local-plugins/<name>.
  3. Build inside the plugin directory.
  4. Commit dist/.
  5. 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.sh

Production assumptions:

  • Output directory is public/.
  • Domain is ssot.0rk.de.
  • Clean URL hosting needs an .html fallback:
location / {
    try_files $uri $uri/ $uri.html =404;
}

11. ๐Ÿงช Debug Fast

SymptomFirst CheckLikely Fix
Build fails on CINode/npm versionUse Node 22+ / npm 10.9.2+
Plugin missingPlugin install statenpx quartz plugin install --from-config
Options ignoredYAML nestingMove settings under options:
Page missingDraft/unlisted/filterCheck draft, unlisted, plugin filters
Bad linksLink resolutionPrefer shortest wikilinks or clean relative Markdown
404 on clean URLWeb server fallbackAdd $uri.html fallback
Local plugin works only locallyMissing committed dist/Build plugin and commit output
Theme breaks in dark modeHardcoded stylesMove theme-aware CSS to custom.scss variables

12. ๐Ÿ›ก๏ธ Hard Rules

  • โœ… Keep source of truth in content/, not generated public/.
  • โœ… 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 check for code/config changes and npx quartz build for 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