Compare commits

..
Author SHA1 Message Date
Jacky ZhaoandClaude Opus 5 041de1c692 perf: memoize the mkdir in emitter write()
every emitted file paid its own recursive mkdir, so a site that emits a
page, an og image and an asset per note does thousands of redundant
syscalls per build. the output dir is cleaned exactly once per process
in buildQuartz, so once a directory has been made it stays made.

caches the in-flight promise rather than a boolean so concurrent writes
into the same new directory can't race a half-finished mkdir.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 16:19:20 -07:00
saberzero1 075afd3f71 fix: import ContentDetails from @quartz-community/content-index instead of generated .quartz/plugins 2026-08-12 14:27:29 +02:00
saberzero1 74b3fc9efd chore: clean up dev-mode artifact 2026-07-30 17:06:37 +02:00
saberzero1 7076a897e1 chore: formatting 2026-07-30 15:43:15 +02:00
saberzero1 507ad7f3d4 chore: regenerate package-lock.json 2026-07-28 11:33:23 +02:00
saberzero1 41864a0eba refactor: replace createRequire with import.meta.resolve in config-loader and gitLoader 2026-07-27 20:47:51 +02:00
saberzero1 508f73a33f feat: replace CJS require with static imports, add comprehensive layout system tests 2026-07-27 20:23:31 +02:00
saberzero1 6f27207fbf chore: update lockfile for latest plugin releases 2026-07-27 18:25:47 +02:00
saberzero1 89fb2afe6f chore: update lockfile for latest plugin releases 2026-07-27 18:24:41 +02:00
saberzero1 a121fd2e96 feat: unify layout slot architecture - make header/footer configurable positions, footer as array, add defaultPosition fallback, add tests, update docs 2026-07-27 17:32:40 +02:00
saberzero1 e37b4888f3 chore: update lockfile for latest plugin releases 2026-07-27 12:33:57 +02:00
saberzero1 e22d4446b4 chore: update lockfile for @quartz-themes/core@1.1.0 2026-07-27 11:40:37 +02:00
saberzero1 c2e1a619f0 chore: update lockfile for @quartz-themes/core@1.0.3 2026-07-27 10:54:51 +02:00
saberzero1 754058ad54 chore: updated dependencies 2026-07-25 19:04:58 +02:00
saberzero1 2a5e3ae574 chore: package-lock.json 2026-07-24 21:43:27 +02:00
saberzero1 94fcabb0b4 feat: add @quartz-themes/core to config and templates
Add disabled theme entry to default config and default/blog templates.
Migrate obsidian and ttrpg templates from git-based quartz-themes source
to npm @quartz-themes/core package.
2026-07-24 20:33:05 +02:00
saberzero1 26a5a86d77 feat: add @quartz-themes/core as a dependency
Add @quartz-themes/core to dependencies and @quartz-themes/ to shared
scopes so theme packages are treated as externals by the plugin bundler.
2026-07-24 20:32:52 +02:00
saberzero1 326bc49b96 chore: update lockfile for crawl-links@0.1.1, bases-page@0.2.2 2026-07-24 02:21:40 +02:00
saberzero1 3c8726834a chore: update lockfile for utils@0.1.1, ofm@0.1.2, bases-page@0.2.1 2026-07-24 01:16:03 +02:00
saberzero1 a791a4f12d fix: disable font ligatures on code blocks (#2428) 2026-07-24 00:43:31 +02:00
Emile Bangma 581f6707da fix: decouple Head.tsx from og-image plugin import (#2495)
Remove unconditional import of CustomOgImagesEmitterName from
.quartz/plugins in Head.tsx. This caused builds to fail when the
og-image plugin was not listed in quartz.config.yaml, violating the
plugin system's opt-in contract.

The fix inlines the emitter name string constant at the usage site.

Also convert the ContentDetails import in fileTrie.ts to
`import type` since it is only used in a type position.
2026-07-23 15:30:37 +02:00
saberzero1 555b2ba838 docs: add npm plugin specifier migration guide 2026-07-23 09:38:52 +02:00
saberzero1 3d99dca87d style: fix whitespace in docs/hosting.md 2026-07-23 09:30:25 +02:00
saberzero1 966307e0d0 style: format docs/hosting.md and loader/index.ts 2026-07-23 09:26:51 +02:00
saberzero1 ebdbb3da21 chore: keep legacy-peer-deps (required for 44 plugins with varying peer ranges)
Multiple plugins declare incompatible peer dep ranges for shared packages
(sharp, @myriaddreamin/rehype-typst, etc). These are optional peers that
work correctly at runtime. legacy-peer-deps is the appropriate setting
for a host application consuming many plugins.
2026-07-23 08:54:50 +02:00
saberzero1 49785911c9 chore: pin plugin dependencies to semver ranges 2026-07-23 08:34:31 +02:00
saberzero1 e8ccb7991c chore: updated package-lock.json 2026-07-23 02:23:38 +02:00
saberzero1 11b9960663 feat: migrate to npm specifiers with type-safe plugin index
- Default config and all 4 templates use @quartz-community/* npm specifiers
- config-loader: npm packages imported directly (not via .quartz/plugins/ paths)
- gitLoader: regeneratePluginIndex cross-references .d.ts with .js to correctly
  classify type-only exports, preventing runtime 'does not provide export' errors
- All 44 default plugins added as dependencies
- Locally tested: 111 docs files → 374 output files, zero errors
2026-07-23 02:19:17 +02:00
saberzero1 4b7ecb96f0 revert: restore github: specifiers in default config and templates
The npm specifier path requires additional work in the esbuild
transpilation pipeline to mark npm imports as external. Reverting
to github: specifiers to restore the docs site immediately.

The npm loader code (parsePluginSource, config-loader, CLI) remains
in place for future use. Only the default config/templates are reverted.
2026-07-23 02:06:45 +02:00
saberzero1 a71cbfbeed fix: use npm install in Dockerfile and copy .npmrc for peer dep config 2026-07-23 02:03:47 +02:00
saberzero1 b6939da24d fix: use npm install in all CI workflows for lockfile compatibility 2026-07-23 02:01:58 +02:00
saberzero1 6fdeaef8c2 fix: use npm install instead of npm ci in deploy
The lockfile was generated on linux x86_64 but CI needs platform-
specific optional deps for all architectures. npm install resolves
them correctly while npm ci requires exact lockfile match.
2026-07-23 01:59:52 +02:00
saberzero1 eefff261a6 chore: retrigger deploy after lockfile fix 2026-07-23 01:57:51 +02:00
saberzero1 7ed01ddd43 fix: add legacy-peer-deps for plugin peer dependency conflicts
og-image requires sharp as a peer dep which conflicts with the
version installed by quartz core. legacy-peer-deps allows both
to coexist until the peer dep ranges are aligned.
2026-07-23 01:47:39 +02:00
saberzero1 fe1f1d30aa fix: add npm plugin dependencies and fix fonts package name
- Added all 44 default plugins as dependencies so npm ci installs them
- Fixed @quartz-community/fonts → @quartz-community/quartz-fonts (actual npm name)
- Regenerated package-lock.json with plugin dependencies
2026-07-23 01:46:28 +02:00
saberzero1 57094a8fee fix: make quartz.lock.json optional in Dockerfile
With npm specifiers, quartz.lock.json may not exist.
The glob pattern makes the COPY conditional.
2026-07-23 01:34:12 +02:00
saberzero1 97eea3ee34 feat: migrate default config and templates to npm specifiers
- quartz.config.default.yaml: all 44 plugins use @quartz-community/* npm specifiers
- cli/templates/*.yaml: all 4 templates updated (default, blog, obsidian, ttrpg)
- bootstrap-cli.mjs: updated help text
- package.json: devDeps use npm semver ranges instead of github: specifiers
- gitLoader.ts: regeneratePluginIndex scans npm packages from node_modules
- install-plugins.ts: generates plugin index for npm packages
- Removed quartz.lock.json (only relevant for git-installed plugins)
2026-07-23 01:29:25 +02:00
saberzero1 ab8e77392c revert: do not gitignore quartz.config.yaml (user config file) 2026-07-23 01:21:07 +02:00
saberzero1 f45b9d42bd chore: gitignore quartz.config.yaml (user-generated) 2026-07-23 01:19:37 +02:00
saberzero1 af583c167a chore: remove dev-mode config 2026-07-23 01:19:29 +02:00
saberzero1 de21613607 style: format loader files 2026-07-23 01:19:21 +02:00
saberzero1 69571de66e chore: remove dev-mode local config (should not be committed) 2026-07-23 01:18:03 +02:00
saberzero1 5b34917e98 feat: support npm scoped package specifiers for plugins
Plugins can now be referenced as "@quartz-community/<name>" in
quartz.config.yaml and via 'quartz plugin add'. The npm path skips
git installation and resolves from node_modules.

Changes:
- gitLoader.ts: detect @scope/name as npm package in parsePluginSource()
- config-loader.ts: skip git install for npm packages, read manifests
  from node_modules via createRequire
- install-plugins.ts: filter npm packages from prebuild, fallback to
  YAML config parsing to avoid loading full quartz.ts
- plugin-data.js: npm detection in CLI parseGitSource()
- plugin-git-handlers.js: npm install path in handlePluginAdd()
- package.json: add missing hast-util-from-html dependency
2026-07-23 01:17:53 +02:00
dependabot[bot] 9cf87ff1c2 chore(deps): bump the ci-dependencies group across 1 directory with 9 updates (#2426)
Bumps the ci-dependencies group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6` | `7` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `7` | `8` |
| [rlespinasse/github-slug-action](https://github.com/rlespinasse/github-slug-action) | `5.4.0` | `5.6.0` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.0.0` | `4.1.2` |
| [docker/login-action](https://github.com/docker/login-action) | `3` | `4` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5` | `6` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` |



Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

Updates `actions/download-artifact` from 7 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

Updates `rlespinasse/github-slug-action` from 5.4.0 to 5.6.0
- [Release notes](https://github.com/rlespinasse/github-slug-action/releases)
- [Commits](https://github.com/rlespinasse/github-slug-action/compare/v5.4.0...v5.6.0)

Updates `docker/setup-qemu-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

Updates `docker/setup-buildx-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

Updates `sigstore/cosign-installer` from 4.0.0 to 4.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v4.0.0...v4.1.2)

Updates `docker/login-action` from 3 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

Updates `docker/metadata-action` from 5 to 6
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

Updates `docker/build-push-action` from 6 to 7
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: ci-dependencies
- dependency-name: rlespinasse/github-slug-action
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci-dependencies
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 20:22:29 -04:00
Leo SchultheissandLeo Schultheiß e54b89f889 fix(ci): add git install to Dockerfile (#2443)
Co-authored-by: Leo Schultheiß <leo.schultheiss@fau.de>
2026-06-15 20:21:46 -04:00
Narath Carlile e12ca11100 fix: watch quartz.config.yaml during serve (#2448)
The serve-mode watcher globs never matched quartz.config.yaml or
quartz.config.default.yaml, so config edits (theme colors, plugin
flags, footer links) silently required a server restart. This was a
regression from v4, where quartz.config.ts matched the **/*.ts glob.
2026-06-15 20:19:27 -04:00
saberzero1 92a4a48430 fix: callouts overlapping explorer 2026-06-11 17:55:16 +02:00
saberzero1 9e74db69a9 docs: clarified and extended installation guide 2026-06-11 15:07:26 +02:00
saberzero1 25d89ff94a chore: updated plugins 2026-06-11 14:54:19 +02:00
saberzero1 decbd0a969 chore: updated plugins 2026-06-11 12:10:38 +02:00
saberzero1 87083faeb6 docs: updated fonts configuration 2026-06-11 10:46:55 +02:00
saberzero1 58593c7c72 docs: added documentation for fonts 2026-06-10 23:17:32 +02:00
saberzero1 8a79f59abb chore: configure fonts plugin in templates 2026-06-10 23:17:19 +02:00
saberzero1 2000295346 feat: added fonts plugin 2026-06-10 23:17:05 +02:00
saberzero1 c5bbc92b74 docs: updated migration guide and alias-redirect options 2026-06-09 20:01:46 +02:00
saberzero1 b2f1dad514 fix(alias-redirect): emit original filepath casing as redirect 2026-06-09 20:01:25 +02:00
saberzero1 81db804f54 fix(themes): callouts and layout issues 2026-06-09 02:24:05 +02:00
saberzero1 9737bce709 fix(slugs): remove obsidian-importer known invalid file characters from slugs 2026-06-03 15:34:54 +02:00
saberzero1 951dfee599 fix(i18n): explorer/graph missing mapping 2026-06-03 15:26:32 +02:00
saberzero1 afe98e6b1a fix: excalidraw panning on mobile and .jxl support 2026-05-27 20:56:47 +02:00
saberzero1 f15aa0032a fix: allow updating when repository is generated from template 2026-05-27 20:43:56 +02:00
saberzero1 9e4d4518bd fix: anchor links without alias follow obsidian reading mode 2026-05-27 00:33:38 +02:00
saberzero1 3138a88bb1 chore: updated layouts to include table of contents 2026-05-27 00:18:06 +02:00
saberzero1 db5aca2b8d fix: apply default position when installing plugins 2026-05-27 00:17:45 +02:00
saberzero1 dd1b36c148 fix: recent notes default date type 2026-05-26 22:26:21 +02:00
saberzero1 4579e49465 test: regression tests for junctions 2026-05-26 21:15:36 +02:00
saberzero1 882d3b3f50 fix: fall back to junctions on windows 2026-05-26 21:15:20 +02:00
saberzero1 667d487a0f fix: re-render graph on mode change 2026-05-26 19:47:54 +02:00
saberzero1 36b3542371 fix: block link casing 2026-05-26 18:16:22 +02:00
saberzero1 b24f2a5e7b test: add regression tests for baseurl in serve mode 2026-05-26 12:56:32 +02:00
saberzero1 ad685b8d4e fix: use correct baseurl in serve mode 2026-05-26 12:56:18 +02:00
saberzero1 2862ec7303 fix: anchor heading links 2026-05-26 01:57:26 +02:00
saberzero1 9ac5d6e7e6 chore: update all plugins to latest version 2026-05-25 19:41:33 +02:00
saberzero1 399cdd83d2 fix: display the quartz version in the footer 2026-05-25 17:29:47 +02:00
saberzero1 336b3ea131 fix: excalidraw quartz-themes interactions 2026-05-25 17:11:09 +02:00
saberzero1 24975c6975 chore: updated plugins 2026-05-25 04:16:27 +02:00
saberzero1 4a06ee6b44 docs: replaced excalidraw note in plugin table 2026-05-25 03:16:06 +02:00
saberzero1 cbe101dc12 chore: updated configuration templates 2026-05-25 03:15:41 +02:00
saberzero1 29dea35776 chore: updated plugins 2026-05-25 03:15:30 +02:00
saberzero1 257f004bbf fix(bases): properly handle mixed-case tags 2026-05-24 21:28:07 +02:00
saberzero1 51ba21804d docs: cleanup 2026-05-24 21:12:20 +02:00
saberzero1 2dc58a33df fix: bases table view grouping sorting 2026-05-24 21:09:41 +02:00
saberzero1 22fc3b5cef chore: formatting 2026-05-24 21:08:13 +02:00
saberzero1 d6414218de docs: convert repository frontmatter values to markdown links 2026-05-24 20:05:18 +02:00
saberzero1 c837425148 docs: inline bases into markdown 2026-05-24 19:56:20 +02:00
saberzero1 cf28741977 docs: add description frontmatter to all plugin docs for base views 2026-05-24 19:48:32 +02:00
saberzero1 cce45e0718 docs: add repository, enabled, required frontmatter to all plugin docs
Added repository, enabled, and required fields to the frontmatter of
all 44 plugin documentation files. Updated Plugins.base to include
these columns, matching the information previously in the manual tables.
Also filtered out internal plugins (Assets, Static, ComponentResources,
NotFoundPage) from the base query.
2026-05-24 19:46:42 +02:00
saberzero1 38395a1bac docs: replace manual plugin tables with inline .base files
Plugin listings in plugins/index.md and getting-started/whats-new.md
are now generated from .base files that query plugin docs by their tags.
This prevents the tables from going out of sync when plugins are added
or updated. Added new-in-v5 frontmatter property to 8 plugin docs for
the what's-new page filter.
2026-05-24 19:43:00 +02:00
saberzero1 228218ece8 fix: border-radius in board view 2026-05-24 19:24:25 +02:00
saberzero1 27639d5ab5 docs: formatting 2026-05-24 18:50:55 +02:00
saberzero1 97472ebf88 chore: point v5 to quartz.jzhao.xyz 2026-05-24 18:50:44 +02:00
saberzero1 9f7caa96f4 chore: updated og-image 2026-05-24 18:50:02 +02:00
saberzero1 ee683e0e86 docs: add What's New in Quartz 5 page for release
Covers the plugin ecosystem, YAML configuration, Obsidian compatibility,
page type system, layout system, performance, CLI, i18n, new plugins,
and plugin development changes. Also updates home page clone command
for v5 as default branch.
2026-05-24 18:37:33 +02:00
saberzero1 ed0f27c05f fix: move ExternalPlugin overrides before loadQuartzConfig in quartz.ts docs
loadQuartzConfig() internally calls loadQuartzLayout() to build the
PageTypeDispatcher, which instantiates components. Plugin option overrides
must be registered before this happens. Updated quartz.ts and all doc
snippets that show the ExternalPlugin override pattern to place calls
before loadQuartzConfig(). Also updated OxHugo and Roam docs from stale
v4 plugins pattern to v5 override pattern.
2026-05-24 18:33:58 +02:00
Michael Cordell d45b7a7bf6 fix(dispatcher): skip undefined components in collectComponents (#2404)
layout.footer (and other optional layout slots) can be undefined
when disabled. Adding undefined to the seen Set caused a crash in
componentResources.ts when destructuring component properties.
2026-05-24 17:51:42 +02:00
saberzero1 c4b0145e59 docs: formatting 2026-05-24 17:39:58 +02:00
saberzero1 629efafafe chore: updated plugins 2026-05-24 17:37:40 +02:00
saberzero1 eb53936ec7 chore: update lockfile with search and graph plugin fixes 2026-05-24 17:23:29 +02:00
saberzero1 2455c87167 fix: show help on invalid CLI commands and debounce watch rebuilds
- Change .showHelpOnFail(false) to true for better new-user UX
- Add 100ms debounce to watch mode rebuilds to batch rapid file changes
2026-05-24 17:23:11 +02:00
saberzero1 455985f7ef docs: add Node.js requirement, footnotes, and Obsidian plugin support table
- Add Node.js 22 prerequisite callout to installation guide
- Document footnote support via GFM plugin
- Add Obsidian community plugin support table (Dataview, Excalidraw, Leaflet)
2026-05-24 17:23:04 +02:00
saberzero1 601f23f132 chore: update quartz.lock.json with latest plugin commits 2026-05-24 17:15:17 +02:00
saberzero1 6b3c72d11e docs: pre-release documentation fixes
- Remove non-existent 'move' strategy from CLI docs
- Update installation guide for v5 release (remove beta note, fix clone cmd)
- Add fontOrigin configuration documentation
- Document layout condition property with available presets
- Add optional title font to typography example
2026-05-24 17:10:10 +02:00
saberzero1 0d9b356046 fix: resolve client-side navigation and popover issues
- Fix popover crash on missing Content-Type header (null check)
- Fix SPA loading bar corrupting page via micromorph interference
  (remove bar before morph, use ephemeral DOM elements instead of
  persistent reference)
- Add stopLoading() cleanup in navigation finally block
2026-05-24 17:10:03 +02:00
saberzero1 7f00400ad2 fix: improve CLI error handling and user guidance
- Add Node.js >= 22 runtime version check before any imports
- Add EADDRINUSE error handlers for HTTP and WebSocket servers
- Fix misleading 'Couldn't parse Quartz configuration' error message
- Add actionable guidance to sync/upgrade/push failure messages
- Add --concurrency validation (must be >= 1)
2026-05-24 17:09:56 +02:00
saberzero1 caa55037f7 fix: harden core build system against silent failures
- Wrap rebuild() in try/finally to guarantee mutex release (prevents deadlock)
- Surface rebuild errors via .catch() instead of discarding with void
- Add null checks for vfile.data.relativePath (prevents crash on virtual files)
- Add try-finally for worker pool cleanup in parse.ts (prevents thread leaks)
- Remove process.exit(1) from parse error handler (let errors propagate)
- Add per-emitter error handling in emit phase with degraded-build warning
- Replace unsafe Map.get()! assertions with null-checked access in config-loader
2026-05-24 17:09:46 +02:00
saberzero1 17aa8ab233 chore: updated plugins 2026-05-24 15:29:17 +02:00
saberzero1 bdc3347c75 chore: updated plugins 2026-05-24 01:11:50 +02:00
saberzero1 dfde22acfd feat: emit plugin scripts individually instead of bundling into postscript 2026-05-23 19:51:55 +02:00
saberzero1 b1e5d3a7cc test: add regression tests for transclusion changes 2026-05-23 01:29:24 +02:00
saberzero1 4d715774e1 fix: properly handle multiple transclusions 2026-05-23 01:29:10 +02:00
saberzero1 097f3040fb chore: updated plugins 2026-05-23 01:18:34 +02:00
saberzero1 0593c8cd6a fix: allow arbitrary transclusion 2026-05-23 01:18:30 +02:00
saberzero1 5b6588189f chore: updated plugins 2026-05-23 00:42:27 +02:00
saberzero1 c206aa3c02 docs: caching documentation 2026-05-22 23:12:45 +02:00
saberzero1 2a02240802 feat: preload static resources 2026-05-22 23:12:37 +02:00
saberzero1 cfcd9c18ac feat: split and hash inlined assets 2026-05-22 23:03:39 +02:00
saberzero1 cfba672f51 feat: split and hash static css 2026-05-22 22:42:06 +02:00
saberzero1 2e34c64c63 chore: updated plugins 2026-05-22 20:11:20 +02:00
saberzero1 70c2aa0f53 chore: format 2026-05-22 20:09:57 +02:00
saberzero1 afb84b1ffe docs: add missing options to emitter plugin documentation
- ContentIndex: clarify rssFullHtml default
- CustomOgImages: add defaultTitle and defaultDescription options
2026-05-22 20:07:48 +02:00
saberzero1 05b79e1d60 docs: add missing options to component and page type plugin documentation
- Graph: add focusOnHover and numeric defaults for all D3Config options
- Search: add enablePreview and fieldPriority options
- TableOfContents: add layout component option
- FolderPage: add showFolderCount and showSubfolders options
- TagPage: add numPages option
- BasesPage: add linkResolution option
2026-05-22 20:07:48 +02:00
saberzero1 f681e871ea docs: add missing options to transformer plugin documentation
- CreatedModifiedDate: add defaultDateType option
- Description: add maxDescriptionLength option
- Latex: add katexOptions, mathJaxOptions, typstOptions
- SyntaxHighlighting: add clipboard and tokenClassification options
- RoamFlavoredMarkdown: add tableComponent and attributeComponent
2026-05-22 20:07:48 +02:00
saberzero1 bc1c6a47d8 docs: fix incorrect plugin option defaults and phantom options
- Citations: remove non-existent prettyLink option
- Explorer: correct folderClickBehavior default from collapse to link
- RecentNotes: fix limit default from 5 to 3, add hideTagPages/hideFolderPages
- StackedPages: fix option names to match source (maxTabs, not maxPanes)
2026-05-22 20:07:47 +02:00
saberzero1 c6d7da00b2 chore: updated plugins 2026-05-22 04:02:16 +02:00
saberzero1 0c008d49c2 chore: updated plugins 2026-05-22 02:54:39 +02:00
saberzero1 7c7e8789ca chore: updated plugins 2026-05-22 01:34:31 +02:00
saberzero1 4a9000cd16 chore: updated plugins 2026-05-22 00:28:57 +02:00
saberzero1 307f3b9298 chore: updated plugins 2026-05-21 22:17:59 +02:00
saberzero1 d88e97c769 chore: updated plugins 2026-05-21 17:59:37 +02:00
saberzero1 7fd0590a46 fix: improved plugin type resolution 2026-05-21 17:59:26 +02:00
saberzero1 0c63884f65 docs: improved installation and migration guides 2026-05-21 14:33:07 +02:00
saberzero1 47e0ba3a58 chore: updated plugins 2026-05-21 13:36:33 +02:00
saberzero1 0e314cb1eb chore: updated plugins 2026-05-21 01:34:23 +02:00
saberzero1 635d2af12e chore: updated plugins 2026-05-20 23:23:48 +02:00
saberzero1 21ea5895cb fix: improved plugin validation on install 2026-05-20 23:23:39 +02:00
saberzero1 9031614318 chore: updated plugins 2026-05-18 23:46:46 +02:00
saberzero1 cb83ed320f chore: updated plugins 2026-05-18 19:36:49 +02:00
saberzero1 3da68acd02 chore: updated plugins 2026-05-17 23:34:28 +02:00
saberzero1 38eca77b5e chore: updated plugins 2026-05-16 18:00:54 +02:00
saberzero1 17efeb93f3 chore: updated plugins 2026-05-02 15:39:21 +02:00
saberzero1 c8f6e6dc14 feat(css): make styles layered by default 2026-04-28 17:25:37 +02:00
saberzero1 f3a549a68d chore: updated plugins 2026-04-28 00:07:24 +02:00
saberzero1 a76af2866b docs: update plugin CLI and troubleshooting for pre-built distribution 2026-04-28 00:03:53 +02:00
saberzero1 9fcc3f260c fix: handle EEXIST race in peer dependency symlink creation 2026-04-27 22:34:31 +02:00
saberzero1 886bf6d7f6 chore: updated plugins 2026-04-27 22:27:02 +02:00
saberzero1 24f2a7325a chore: updated plugins 2026-04-27 22:21:55 +02:00
saberzero1 4914242ef9 chore: updated plugins 2026-04-27 22:03:47 +02:00
saberzero1 907cef735b docs: updated plugin guide for bundling native dependencies 2026-04-27 22:03:41 +02:00
saberzero1 efd9e8e095 feat(loader): prefer pre-built plugins 2026-04-27 22:03:23 +02:00
saberzero1 6a2bb304d2 chore: updated plugins 2026-04-26 02:33:03 +02:00
saberzero1 8e45841e34 chore: updated plugins 2026-04-25 23:15:29 +02:00
saberzero1 a85c3bd814 refactor(theme): use Obsidian CSS custom property names 2026-04-25 23:13:50 +02:00
saberzero1 dfc2369140 chore: updated plugins 2026-04-24 23:58:33 +02:00
saberzero1 710db1f161 fix(components): deduplicate plugin handler registration 2026-04-24 23:56:53 +02:00
saberzero1 4ffe041f13 chore: updated plugins 2026-04-22 18:27:16 +02:00
saberzero1 b3082c32dc fix(path): improper redirects in subpath domain sites 2026-04-22 18:25:05 +02:00
saberzero1 ff19a3bf38 chore: updated plugins 2026-04-19 21:44:31 +02:00
saberzero1 dc88017b37 feat(404): try redirect to lowercase URL 2026-04-19 21:44:23 +02:00
saberzero1 4fc6be7850 chore: updated plugins 2026-04-17 22:17:51 +02:00
saberzero1 e15b3da014 docs: update ts-config override examples 2026-04-17 22:17:43 +02:00
saberzero1 f370898c56 fix(config): properly pass ts-based options to plugins 2026-04-17 22:14:36 +02:00
saberzero1 cab4b523df fix(embed): properly resolve heading links in embeds 2026-04-17 12:50:50 +02:00
saberzero1 6c3b94e474 docs: updated links 2026-04-17 03:25:16 +02:00
saberzero1 c32d11cb8b fix(build): remove extension-stripped slug aliases that pollute allSlugs
addVirtualPageSlugAliases injected extension-stripped aliases for
every PageType-registered extension into ctx.allSlugs (e.g. for
`Canvas.canvas` it added an alias `canvas`). Intended to help
`![[file.canvas]]` transclusions resolve to virtual pages, but:

1. CrawlLinks' shortest strategy treats allSlugs entries as real
   files. When an author writes `[[Canvas]]` in a note, shortest
   lookup matches BOTH the alias `canvas` and real basenames
   like `features/canvas`. With matchingFileNames.length === 2,
   the uniqueness check fails and transformLink falls back to
   absolute resolution, producing a dead href `./canvas` that
   points to no emitted file.

2. The aliases were never actually needed for transclusion.
   renderPage.tsx already has its own extension-stripping
   fallback (lines 107-119) that consults allFiles directly.
   Virtual pages (canvas-page, bases-page) emit at slugs that
   KEEP their extension (e.g. `canvas.canvas`), so
   `![[Canvas.canvas]]` resolves naturally without any alias.

3. The aliases mispresent Obsidian semantics. In Obsidian,
   `[[Canvas]]` resolves to `Canvas.md`; non-md files require
   the explicit extension (`[[Canvas.canvas]]`). Injecting
   extension-stripped aliases into allSlugs made Quartz claim
   bare names can refer to non-md virtual pages, which is
   wrong.

Reproduction: docs/features/index.md contains `[[Canvas]]` which
should resolve to docs/features/Canvas.md (slug features/canvas).
Under the old behavior it produced href="../canvas" with
data-slug="canvas" pointing nowhere. After this fix it produces
href="../features/canvas" with data-slug="features/canvas"
correctly.

Verified with fresh `npx quartz build -d docs`:
- [[Canvas]] → ./features/canvas ✓
- ![[Canvas.canvas]] transclusion still works ✓
- ![[Base.base]] virtual page still emits ✓
- 0 internal broken links across all output ✓
- all 91 existing tests pass
2026-04-17 03:05:36 +02:00
saberzero1 0572f06d08 chore: updated plugins 2026-04-17 03:00:00 +02:00
saberzero1 17d5ae76bf refactor(util/path): re-export normalizeHastElement from @quartz-community/utils
The normalizeHastElement helper and its internal _rebaseHastElement
have been promoted to @quartz-community/utils so that plugins can
consume the same cross-slug HAST rebasing logic Quartz core uses
for transclude expansion. Previously they lived only in Quartz's
internal util/path module, which out-of-tree plugins (e.g.
canvas-page, whose buildEmbeddedContent embeds vfile.data.htmlAst
from arbitrary pages) could not import from.

normalizeRelativeURLs and its DOM-element sibling _rebaseHtmlElement
stay local - those operate on DOM Elements at runtime, not HAST AST
nodes, and belong with Quartz's DOM-specific code.
2026-04-17 02:27:48 +02:00
saberzero1 f711071020 deps: update @quartz-community/utils 2026-04-17 02:05:55 +02:00
saberzero1 85563ffaab fix: wikilinks normalization and various slugging fixes 2026-04-17 00:35:28 +02:00
saberzero1 6def58c0d0 feat(recent notes): add user-friendly tag and folder filters 2026-04-16 19:17:32 +02:00
saberzero1 5f513a80bb fix: include types/utils dist 2026-04-16 16:41:14 +02:00
saberzero1 9c118804a9 docs: clarified setup guide 2026-04-16 16:38:31 +02:00
saberzero1 5bec6fb87b fix(popover): cache no longer always misses 2026-04-16 16:38:16 +02:00
saberzero1 b9d4298321 docs: updated plugin list 2026-04-11 15:56:44 +02:00
saberzero1 64001920a0 docs: updated concurrency flag 2026-04-11 15:52:02 +02:00
saberzero1 64802f858b feat(cli): generalize concurrency flag 2026-04-11 15:51:50 +02:00
saberzero1 7e01af6a4d chore: updated plugins 2026-04-11 15:38:07 +02:00
saberzero1 232781cbca chore: updated templates 2026-04-11 15:37:01 +02:00
saberzero1 2c1d9b5fb6 docs: added unlisted page and encrypted page 2026-04-11 15:35:40 +02:00
saberzero1 b8b71edffe chore: updated templates 2026-04-11 14:22:48 +02:00
saberzero1 d2e2df8518 chore: updated plugins 2026-04-11 14:22:40 +02:00
saberzero1 afa63033cc fix: make fileTrie last-write-wins; warn on slug collisions 2026-04-10 21:14:23 +02:00
saberzero1 9d26e48dc5 chore: updated plugins 2026-04-10 19:22:47 +02:00
saberzero1 341b800663 chore: updated path utils 2026-04-10 19:19:12 +02:00
saberzero1 07c9bb6976 chore: updated plugins 2026-04-10 10:15:37 +02:00
saberzero1 512d48d719 chore: updated plugins 2026-04-07 16:49:29 +02:00
saberzero1 bbcaa22413 chore: updated plugins 2026-04-07 16:14:20 +02:00
saberzero1 7a86a76f44 fix(graph): gracefully handle context destruction 2026-04-04 20:41:09 +02:00
saberzero1 c4c6016755 fix: update all plugins to bundle utils (prevents subpath resolution failures) 2026-04-04 11:38:24 +02:00
saberzero1 f5b66ec3f0 fix: update folder-page and tag-page to bundle utils (fixes folder page 404s) 2026-04-04 11:29:29 +02:00
saberzero1 0f84b66cea chore: updated plugins 2026-04-04 02:48:34 +02:00
saberzero1 88337abbe1 deps: update plugins with v4 translation ports 2026-04-04 02:23:49 +02:00
Sara Lilith Slootmaker 2bf6cb655b chore: update links to leaflet bases plugin (#2347)
* chore: update leaflet bases plugin

* docs: update external link
2026-04-04 01:18:22 +02:00
saberzero1 5c934ca1c6 deps: update plugin lockfile after utils dependency additions 2026-04-03 19:34:31 +02:00
saberzero1 9c62152257 deps: update plugin lockfile after utility migrations 2026-04-03 19:28:42 +02:00
saberzero1 287d41b2ac docs: add package layering, plugin type guide, i18n guide, bases views, and import reference 2026-04-03 19:06:48 +02:00
saberzero1 1f555cf6c4 chore: updated plugins 2026-04-03 17:02:00 +02:00
saberzero1 e0fadf7e77 deps: update all community plugin dependencies 2026-04-03 16:22:42 +02:00
saberzero1 31ca75e762 deps: update community packages and plugin lockfile for vfile migration 2026-04-03 16:05:23 +02:00
saberzero1 0c50cca1f6 refactor: move vfile DataMap augmentation to @quartz-community/types 2026-04-03 15:41:11 +02:00
saberzero1 b7885ce779 deps: update community packages and plugin lockfile 2026-04-03 15:10:36 +02:00
saberzero1 1d5d069174 fix: remove unused code in git handlers 2026-04-03 14:57:53 +02:00
saberzero1 2a6117142c feat: parallel git command handling 2026-04-03 14:39:30 +02:00
saberzero1 52e4257bda chore: linting 2026-04-03 14:20:25 +02:00
saberzero1 785ac92347 docs: updated CI guides 2026-04-03 14:18:43 +02:00
saberzero1 c0d3a30fdd chore: linting 2026-04-03 14:11:09 +02:00
saberzero1 2180e2e17b docs: backing up content 2026-04-03 14:11:00 +02:00
saberzero1 712b4477b7 docs: simplified migration instructions 2026-04-03 14:00:00 +02:00
saberzero1 00c4e392ff refactor(cli): remove migrate command 2026-04-03 13:59:43 +02:00
saberzero1 1342728ce2 chore: linting 2026-03-31 20:51:32 +02:00
saberzero1 84ee01f790 docs: cleanup 2026-03-31 19:39:50 +02:00
saberzero1 8e7100a562 docs: clarified setup guide 2026-03-31 19:23:08 +02:00
saberzero1 3012aa01ea feat(cli): async update checking 2026-03-31 19:22:17 +02:00
saberzero1 04912ac2e5 docs: updated cli commands 2026-03-31 18:50:38 +02:00
saberzero1 db2cc6abca refactor: simplified CLI options 2026-03-31 18:50:27 +02:00
saberzero1 704484d6a5 fix(ofm): support for both casings of checkbox x character 2026-03-31 12:44:25 +02:00
saberzero1 0b377b36d6 fix(search): scroll-to-highlight and temporary highlight 2026-03-30 00:42:10 +02:00
saberzero1 442159a21c feat(search): multiple tag support + styling fixes 2026-03-29 15:49:33 +02:00
saberzero1 13f8d5b41b fix: link resolution on canvas pages 2026-03-29 03:57:20 +02:00
saberzero1 4a8b10f60d fix: link resolution on canvas pages 2026-03-29 00:53:40 +01:00
saberzero1 dce936ffd4 fix: Obsidian comment syntax support 2026-03-27 23:31:24 +01:00
saberzero1 31ad9edd2a fix(folder): use folder name if no title is set in index.md 2026-03-26 13:24:59 +01:00
saberzero1 144b7d9a4a fix(cli): properly handle subdir plugin updates 2026-03-26 11:44:52 +01:00
saberzero1 a876a1e11e fix(ofm): guard against negative micromark virtual codes before calling String.fromCodePoint() 2026-03-26 11:20:02 +01:00
saberzero1 8a98878e5c fix(ofm): render svg as objects instead of imgs 2026-03-26 00:38:29 +01:00
saberzero1 328ef01c67 chore: updated plugins 2026-03-25 22:19:38 +01:00
saberzero1 2d579c0f9e feat(cli): added flags for plugin name and subdir 2026-03-25 22:18:51 +01:00
saberzero1 f881d5e332 fix(schema): added missing position option to plugin schema 2026-03-23 12:28:28 +01:00
saberzero1 6d08b5f070 fix(bases): extract Object values before toStringValue 2026-03-22 22:07:26 +01:00
saberzero1 96bf848aa9 fix(paths): implement support for partial part resolution 2026-03-22 12:48:08 +01:00
saberzero1 31d5c025b2 deps: update @quartz-community/utils to latest 2026-03-22 12:05:17 +01:00
saberzero1 434c166ed0 chore: updated plugins 2026-03-20 21:24:30 +01:00
saberzero1 c1de25ebe8 chore: updated plugins 2026-03-20 21:14:44 +01:00
saberzero1 619a3b7f0f docs: updated date documentation 2026-03-20 21:14:30 +01:00
saberzero1 b61e023759 chore: updated templates 2026-03-20 21:14:15 +01:00
saberzero1 d9bfbf876f refactor: move defaultDateType to CreatedModifiedDate plugin 2026-03-20 21:13:45 +01:00
saberzero1 28414da76e chore: updated plugins 2026-03-20 13:52:35 +01:00
saberzero1 c7b527ae9f docs: aligned with recent changes 2026-03-20 13:52:19 +01:00
saberzero1 d413917f8f fix(bases): use the link utils from the utils instead 2026-03-20 12:05:41 +01:00
saberzero1 f7ead71ee5 chore: updated plugins 2026-03-19 22:26:29 +01:00
saberzero1 67c5433fe6 chore: disable stacked pages in documentation 2026-03-19 22:22:24 +01:00
saberzero1 4c854f845c chore: updated plugins 2026-03-19 22:18:49 +01:00
saberzero1 627fa78f19 docs: updated Bases documentation 2026-03-19 22:18:42 +01:00
saberzero1 b4e07a560e chore: updated plugins 2026-03-19 17:03:59 +01:00
saberzero1 de4826a83f chore: updated plugins 2026-03-19 11:04:37 +01:00
saberzero1 49a1ddfd84 chore: updated plugins 2026-03-19 00:11:23 +01:00
saberzero1 cd17a74eeb chore: updated plugins 2026-03-18 19:24:59 +01:00
saberzero1 cc6cb46114 chore: updated plugins 2026-03-18 18:37:59 +01:00
saberzero1 954306ab21 chore: updated plugins 2026-03-18 17:56:00 +01:00
saberzero1 da6c498dc9 docs: added new configuration options for page types 2026-03-18 17:52:40 +01:00
saberzero1 db11f757c2 fix(pagetypes): prevent duplicate content 2026-03-18 17:45:56 +01:00
saberzero1 c65fb652d2 chore: updated plugins 2026-03-18 13:02:09 +01:00
saberzero1 7cd15f5aba chore: updated plugins 2026-03-18 12:39:32 +01:00
saberzero1 1b999a792f fix: expose base path via data-basepath attribute on body
Compute the base path from cfg.baseUrl and set it as a data attribute on
<body> so client-side scripts can resolve links correctly when Quartz is
deployed to a subdirectory (e.g., user.github.io/repository).
2026-03-18 11:51:06 +01:00
saberzero1 75aef3b0a9 chore: updated plugins 2026-03-18 02:40:01 +01:00
saberzero1 f2c2a31292 fix(cli): resolve subdir plugins during build installs 2026-03-18 02:39:45 +01:00
saberzero1 166b9c87d8 fix(cli): properly resolve subdir plugin installs 2026-03-18 01:56:48 +01:00
saberzero1 a7dca22667 chore: updated plugins 2026-03-18 01:18:21 +01:00
saberzero1 bd32a98749 docs: added documentation on plugin install options 2026-03-18 01:18:07 +01:00
saberzero1 219bed15bf chore: updated plugin schema definition 2026-03-18 01:17:10 +01:00
saberzero1 7b85aa3464 fix(cli): extended options for plugin sources 2026-03-18 01:12:38 +01:00
saberzero1 b2ae694b9a chore: updated plugins 2026-03-17 22:51:25 +01:00
saberzero1 51b05e79e2 feat: centralize native dep installation across plugins
Replace per-plugin npm install with a single aggregated npm install
in the quartz root. Plugins declaring requiresInstall in their quartz
manifest now have their peerDependencies collected and installed
together, letting npm resolve compatible versions across plugins.
2026-03-17 22:32:47 +01:00
saberzero1 13a25cbfaf chore: remove 24 plugin-only dependencies from package.json
Remove dependencies that are only used by plugins and already bundled
into their dist files via devDependencies/tsup. This reduces the
install footprint by ~136 packages.

Removed: flexsearch, github-slugger (kept - needed by @quartz-community/utils),
gray-matter, hast-util-to-html, hast-util-to-string, is-absolute-url,
js-yaml, mdast-util-find-and-replace, mdast-util-to-hast,
mdast-util-to-string, reading-time, rehype-autolink-headings,
rehype-citation, rehype-katex, rehype-mathjax, rehype-pretty-code,
rehype-raw, rehype-slug, remark-breaks, remark-frontmatter,
remark-gfm, remark-math, remark-smartypants, satori, toml,
@types/js-yaml.

Kept native-binary deps: sharp, @napi-rs/simple-git,
@myriaddreamin/rehype-typst (cannot be bundled by plugins).
2026-03-17 21:50:02 +01:00
saberzero1 94cb313ce6 chore: updated plugins 2026-03-17 21:37:02 +01:00
saberzero1 02488d07b2 fix: suppress harmless esbuild warnings from bundled plugin deps
Add logOverride to the main esbuild build context to silence three
warning types that originate from upstream third-party code bundled
inside plugin dist files:
- direct-eval: gray-matter's JS frontmatter engine in note-properties
- equals-negative-zero: webidl-conversions in citations
- duplicate-object-key: BibTeX month mapping in citations
2026-03-17 21:26:44 +01:00
saberzero1 d792d8ebf9 feat: add runtime plugin externals validation and native dep install
- validatePluginExternals() scans plugin dist/ for unbundled imports
  and warns when non-allowlisted externals are detected
- installPluginDepsIfNeeded() runs npm install for plugins with
  quartz.requiresInstall flag (for native deps like sharp)
- Added requiresInstall field to PluginManifest type
2026-03-17 19:46:42 +01:00
saberzero1 a932000421 fix: bump @quartz-community/utils to resolve ./jsx export error 2026-03-17 19:46:35 +01:00
steven-smith-IT 56a801345a fix(cli): use 'gray' instead of 'grey' in styleText calls (#2340) 2026-03-17 15:23:32 +01:00
saberzero1 f7f33444ca chore: linting 2026-03-16 22:55:39 +01:00
saberzero1 7e28a970e7 fix(cli): quote paths in git commands for windows users 2026-03-16 22:42:02 +01:00
saberzero1 49caf725dd chore: updated plugins 2026-03-16 19:34:18 +01:00
saberzero1 24634934d1 docs: added documentation on init() for component plugins 2026-03-16 14:31:16 +01:00
saberzero1 4bb075cc64 fix(plugin): forward component options from plugin bases views 2026-03-16 14:20:14 +01:00
saberzero1 14328062da docs: updated plugin documentation to match recent changes 2026-03-16 13:15:55 +01:00
saberzero1 6ec256dcbc fix(plugin) resolve lockfile after create 2026-03-16 13:05:12 +01:00
saberzero1 52ca3aef4c docs: updated leaflet map plugin link 2026-03-16 12:34:51 +01:00
saberzero1 0f67327a6c fix(plugin): restore user lockfile after upgrading 2026-03-16 12:20:27 +01:00
saberzero1 b2971bde6b fix(plugin): always shallow clone plugins 2026-03-16 12:19:52 +01:00
saberzero1 cc8756b0c7 chore: updated plugins 2026-03-16 12:07:16 +01:00
saberzero1 b11bad1326 fix(plugin): default to HEAD instead of main 2026-03-16 11:55:47 +01:00
saberzero1 f8c9a2926d fix(plugin): build plugins when dist is ignored 2026-03-16 11:49:15 +01:00
saberzero1 1b878e655e chore: updated plugins 2026-03-16 01:50:23 +01:00
saberzero1 a7d91f05f9 fix: resolve frontmatter type declaration conflict between plugins and index.ts
- Removed frontmatter from description plugin's vfile augmentation to avoid
  conflicting DataMap declarations (TS2717/TS2687)
- Aligned frontmatter type in index.ts with note-properties plugin declaration
- Updated quartz.lock.json for description plugin
2026-03-14 23:04:10 +01:00
saberzero1 821e124ca2 fix: update quartz.lock.json to plugin commits with fixed types/utils lockfiles 2026-03-14 22:47:16 +01:00
saberzero1 cd8abda27c chore: updated plugins 2026-03-14 22:37:06 +01:00
saberzero1 cdda0dc520 fix: pass string to styleText instead of Error object
styleText('grey', err) throws ERR_INVALID_ARG_TYPE when err is an Error
object. Use err.message ?? String(err) to pass a string instead.
2026-03-14 22:31:34 +01:00
saberzero1 b0724bf99d chore: updated plugins 2026-03-14 22:07:09 +01:00
saberzero1 341b8b3779 perf(plugins): parallelize builds, skip when dist/ exists, fix double-build
- Use --ignore-scripts during npm install to prevent duplicate builds
- Skip build entirely when dist/ directory already exists (pre-built plugins)
- Add buildPluginAsync() and runParallel() for concurrent plugin builds
- Convert all 5 build loops to parallel execution bounded by CPU count
- Prune devDependencies after build to avoid singleton duplication
2026-03-14 22:02:49 +01:00
saberzero1 85680868b7 chore: updated plugins 2026-03-14 21:43:18 +01:00
saberzero1 6dbb287c14 feat(plugins): symlink peer dependencies from host to reduce duplication
Extend linkPeerPlugins() to handle two cases after pruning devDependencies:
1. @quartz-community/* peers → symlink to sibling plugin (existing)
2. All other peers → symlink to host Quartz node_modules (new)

Combined with the plugin-side changes (build tools moved to devDependencies,
shared runtime deps moved to peerDependencies), this reduces per-plugin
node_modules from ~59MB to ~6.7MB — an ~89% reduction (~2.2GB total savings
across 42 plugins).
2026-03-14 21:28:18 +01:00
saberzero1 171ddcf753 fix(ci): v5 beta baseUrl 2026-03-14 18:22:24 +01:00
saberzero1 5ec3f4a13a fix(ci): build v5 preview 2026-03-14 18:19:40 +01:00
155 changed files with 11378 additions and 6985 deletions

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ jobs:
restore-keys: |
${{ runner.os }}-plugins-
- run: npm ci
- run: npm install
- name: Install Quartz plugins
run: npx quartz plugin install
@@ -48,7 +48,7 @@ jobs:
run: npx quartz build -d docs -v
- name: Upload build artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: preview-build
path: public
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
restore-keys: |
${{ runner.os }}-plugins-
- run: npm ci
- run: npm install
- name: Install Quartz plugins
run: npx quartz plugin install
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
name: Deploy Preview to Cloudflare Pages
steps:
- name: Download build artifact
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
id: preview-build-artifact
with:
name: preview-build
+13 -2
View File
@@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
- name: Cache dependencies
uses: actions/cache@v5
@@ -33,7 +33,18 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- name: Cache Quartz plugins
uses: actions/cache@v5
with:
path: .quartz/plugins
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
restore-keys: |
${{ runner.os }}-plugins-
- run: npm install
- name: Install Quartz plugins
run: npx quartz plugin install
- name: Check types and style
run: npm run check
+8 -8
View File
@@ -25,11 +25,11 @@ jobs:
with:
fetch-depth: 1
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v5.4.0
uses: rlespinasse/github-slug-action@v5.6.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
install: true
driver-opts: |
@@ -37,9 +37,9 @@ jobs:
network=host
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v4.0.0
uses: sigstore/cosign-installer@v4.1.2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
@@ -49,7 +49,7 @@ jobs:
- name: Extract metadata tags and labels on PRs
if: github.event_name == 'pull_request'
id: meta-pr
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ env.OWNER_LOWERCASE }}/quartz
tags: |
@@ -59,7 +59,7 @@ jobs:
- name: Extract metadata tags and labels for main, release or tag
if: github.event_name != 'pull_request'
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
flavor: |
latest=auto
@@ -76,7 +76,7 @@ jobs:
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
push: ${{ github.event_name != 'pull_request' }}
build-args: |
+1
View File
@@ -11,3 +11,4 @@ private/
replit.nix
.quartz/
quartz/cli/tui/dist/
.turbo/
+1
View File
@@ -1 +1,2 @@
engine-strict=true
legacy-peer-deps=true
+7 -2
View File
@@ -1,10 +1,15 @@
FROM node:22-slim AS builder
# install git to install plugins
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY package.json .
COPY package-lock.json* .
COPY .npmrc* .
COPY quartz/ ./quartz/
COPY quartz.lock.json .
RUN npm ci; npx quartz plugin install
COPY quartz.lock.json* .
RUN npm install; npx quartz plugin install
FROM node:22-slim
WORKDIR /usr/src/app
+11
View File
@@ -122,3 +122,14 @@ views:
- formula.section
- formula.last_modified
limit: 24
- type: cards
name: Image Cards
filters:
and:
- file.folder == "plugins"
- "!image.isEmpty()"
order:
- file.name
image: note.image
cardSize: 220
imageAspectRatio: 1
+25 -2
View File
@@ -50,6 +50,26 @@ This question is best answered by tracing what happens when a user (you!) runs `
2. If it's not, we wire up the `"nav"` event to just be fired a single time after page load to allow for consistency across how state is setup across both SPA and non-SPA contexts.
3. A separate `"render"` event can be dispatched when the DOM is updated in-place without a full navigation (e.g. after content decryption). Components that attach listeners to content elements should listen for both `"nav"` and `"render"`.
## Community Package Layering
Quartz v5 separates shared code into three community packages, each with a distinct responsibility:
- **`@quartz-community/types`** — Type definitions, interfaces, and the canonical `vfile` DataMap augmentation. This is the "contract" between Quartz and plugins. It has no runtime dependencies.
- **`@quartz-community/utils`** — Shared utility functions (path manipulation, DOM helpers, sorting, date formatting, JSX conversion, etc.). Depends on `@quartz-community/types`.
- **`@quartz-community/runtime`** — Browser-only utilities for client-side scripts (event handling, navigation, storage, script loading). Depends on both `types` and `utils`.
```
types (no deps)
↑
utils (depends on types)
↑
runtime (depends on types + utils)
↑
plugins (depend on any combination)
```
Plugins should import types from `@quartz-community/types`, utility functions from `@quartz-community/utils`, and browser utilities from `@quartz-community/runtime`. This layering ensures plugins don't depend on Quartz core.
## Plugin System
Page types define how a category of pages is rendered. They are configured in the `pageTypes` array in `quartz.config.yaml`.
@@ -64,6 +84,9 @@ There are now four plugin categories:
- **Filters**: Filter content (remove drafts, explicit publish)
- **Emitters**: Reduce over content (generate RSS, sitemaps, alias redirects, OG images)
- **Page Types**: Define how pages are rendered. Each page type handles a specific kind of page (content notes, folder listings, tag listings, 404). The `PageTypeDispatcher` emitter routes pages to the appropriate page type plugin based on the content.
- **Bases Views**: Custom view renderers for the `bases-page` plugin's database-like view system. Plugins can register new view types (e.g., timeline, kanban) via the `ViewRegistry`. See [[making plugins#Bases Views]] for details.
Note that plugin types are **not mutually exclusive** — a single plugin can be a transformer AND provide components (e.g., `obsidian-flavored-markdown`), or be a page type AND provide custom frames (e.g., `canvas-page`).
### Plugin Resolution
@@ -77,8 +100,8 @@ When `npx quartz plugin add github:quartz-community/explorer` is run:
### Plugin CLI Commands
- `npx quartz plugin add github:quartz-community/<name>` — Install a community plugin
- `npx quartz plugin update` — Update all plugins to latest commits
- `npx quartz plugin restore` — Restore plugins from locked commits in `quartz.lock.json` (used in CI/CD)
- `npx quartz plugin install --latest` — Update all plugins to latest commits
- `npx quartz plugin install --clean` — Restore plugins from locked commits in `quartz.lock.json` (used in CI/CD)
- `npx quartz plugin remove <name>` — Remove an installed plugin
### Plugin Structure
+48
View File
@@ -109,6 +109,23 @@ Component.css = styles
> [!warning]
> Quartz does not use CSS modules so any styles you declare here apply _globally_. If you only want it to apply to your component, make sure you use specific class names and selectors.
### Internationalization
Component plugins should use the i18n pattern for any user-facing strings. See [[making plugins#Internationalization (i18n)]] for the full setup guide.
Quick reference:
```tsx
import { i18n } from "../i18n"
const MyComponent: QuartzComponent = ({ cfg }) => {
const t = i18n(cfg.locale ?? "en-US").components.myComponent
return <h2>{t.title}</h2>
}
```
Always provide at least an `en-US` locale as the fallback. Additional locales are optional but encouraged for international reach.
### Scripts and Interactivity
For interactivity, you can declare `.beforeDOMLoaded` and `.afterDOMLoaded` properties on the component. These should be strings containing the JavaScript to be executed in the browser.
@@ -201,6 +218,37 @@ export const layout = await loadQuartzLayout({
})
```
### Receiving YAML Options in Component-Only Plugins
Component plugins that also belong to a processing category (transformer, filter, emitter, page type) receive options through their factory function automatically. However, **component-only plugins** — those whose manifest declares only `"category": ["component"]` — are loaded via side-effect import and don't go through the factory path.
To receive YAML options in a component-only plugin, export an `init` function from your entry point:
```ts title="src/index.ts"
export function init(options?: Record<string, unknown>): void {
// options contains merged defaultOptions + user's YAML options
const myFlag = (options?.myFlag as boolean) ?? false
// Use options to configure registrations, global state, etc.
}
```
Quartz's config-loader calls `init()` after importing the module, passing the merged result of your manifest's `defaultOptions` and the user's `options` from `quartz.config.yaml`. The merge follows the same `{ ...defaultOptions, ...userOptions }` pattern used for processing plugins — user values take precedence.
Declare your defaults in `package.json`:
```json title="package.json"
{
"quartz": {
"category": ["component"],
"defaultOptions": {
"myFlag": false
}
}
}
```
If your plugin does not export `init`, it continues to work as a pure side-effect import — this is fully backward compatible.
## Internal Components
Quartz also has internal components that provide layout utilities. These live in `quartz/components/` and are primarily used for structural purposes:
+220 -10
View File
@@ -63,6 +63,25 @@ The plugin's `package.json` should declare dependencies on `@quartz-community/ty
## Plugin Types
## Choosing a Plugin Type
Quartz supports six plugin capabilities. A single plugin can combine multiple types.
| I want to... | Plugin Type |
| ------------------------------------------------ | ----------- |
| Transform Markdown/HTML content | Transformer |
| Decide which pages to publish | Filter |
| Generate output files (RSS, sitemaps, manifests) | Emitter |
| Define how a category of pages renders | Page Type |
| Add a UI component to the layout | Component |
| Add a custom view to the Bases database system | Bases View |
These are **not mutually exclusive**. For example:
- `obsidian-flavored-markdown` is both a **transformer** (processes OFM syntax) and provides **components** (mermaid rendering)
- `canvas-page` is a **page type** that also provides a custom **frame**
- A plugin could be a **transformer** that adds metadata AND a **component** that displays it
### Transformers
Transformers **map** over content, taking a Markdown file and outputting modified content or adding metadata to the file itself.
@@ -393,13 +412,13 @@ export const MyFrame: PageFrame = {
grid-template-areas: "center";
}
`,
render({ componentData, pageBody: Content, footer: Footer }: PageFrameProps): unknown {
render({ componentData, pageBody: Content, footer: Footers }: PageFrameProps): unknown {
const renderSlot = (C: (props: typeof componentData) => unknown): ComponentChildren =>
C(componentData) as ComponentChildren
return (
<div class="center">
{(Content as any)(componentData)}
{(Footer as any)(componentData)}
{Footers.map((Footer) => (Footer as any)(componentData))}
</div>
)
},
@@ -409,7 +428,7 @@ export const MyFrame: PageFrame = {
Key requirements:
- `name`: A unique string identifier. This is what page types and YAML config reference.
- `render()`: Receives all layout slots (header, sidebars, content, footer) and returns JSX for the inner page structure.
- `render()`: Receives all layout slots (header, sidebars, content, footer) and returns JSX for the inner page structure. Note that `footer` is a `QuartzComponent[]` (an array) — frames should iterate over it with `.map()` to render all footer components.
- `css` (optional): Frame-specific CSS. Scope it with `.page[data-frame="my-frame"]` selectors to avoid conflicts.
**2. Re-export the frame:**
@@ -466,7 +485,87 @@ When a user installs your plugin, Quartz automatically loads the frame from the
> [!tip]
> See the [`canvas-page`](https://github.com/quartz-community/canvas-page) plugin for a complete real-world example of a plugin-provided frame.
## Building and Testing
### Bases Views
The `bases-page` plugin provides a database-like view system similar to Obsidian Bases. Other plugins can register custom view types via the `ViewRegistry`:
```ts
import { viewRegistry } from "@quartz-community/bases-page";
import type { ViewTypeRegistration } from "@quartz-community/bases-page";
viewRegistry.register({
id: "timeline",
name: "Timeline",
icon: "git-branch",
render: ({ entries, view, slug, allSlugs }) => (
<div class="bases-timeline">
{entries.map(entry => <div>{entry.properties.title}</div>)}
</div>
),
css: `.bases-timeline { display: flex; flex-direction: column; }`,
afterDOMLoaded: `document.addEventListener("nav", () => { /* setup */ })`,
});
```
Each view registration includes:
- `id`: Unique identifier (e.g., `"timeline"`, `"kanban"`)
- `name`: Display name shown in the view selector
- `icon`: Optional Lucide icon name
- `render`: Function that receives `ViewRendererProps` and returns Preact JSX
- `css`: Optional CSS string (deduplicated by view ID)
- `afterDOMLoaded`: Optional client-side script (same lifecycle as component scripts)
- `options`: Optional configuration passed to every render invocation
The `ViewRegistry` is a global singleton (via `Symbol.for`) ensuring all copies of the module share the same registry.
## Building and Distribution
Quartz v5 plugins ship pre-built `dist/` in their repositories. When a user installs your plugin, Quartz detects the pre-built output and skips the install/build cycle entirely — making installation near-instant.
### Build Configuration
The plugin template's `tsup.config.ts` bundles all dependencies by default. Only **singleton externals** — packages that must be the same instance across all plugins — are left unbundled:
```ts
const SINGLETON_EXTERNALS = [
"preact",
"preact/hooks",
"preact/jsx-runtime",
"preact/compat",
"@jackyzha0/quartz",
"@jackyzha0/quartz/*",
"vfile",
"vfile/*",
"unified",
]
export default defineConfig({
// ...
noExternal: [/.*/], // Bundle everything
external: SINGLETON_EXTERNALS, // Except singletons
})
```
This means your plugin's `dist/index.js` is self-contained — no `npm install` needed at install time.
### Shipping Pre-built Output
Your plugin's `dist/` directory should be committed to the repository:
1. **Do NOT add `dist/` to `.gitignore`**
2. Run `npm run build` before committing
3. The CI workflow verifies `dist/` is up to date on every push
If `dist/` is missing or gitignored, Quartz falls back to the full install/build cycle (useful during local development with symlinked plugins).
### Plugins with Native Dependencies
Plugins that require native packages (e.g. `sharp` for image processing) cannot bundle those. For these plugins:
1. Set `"requiresInstall": true` in your `package.json` quartz manifest
2. Declare the native package as a `peerDependency`
3. Quartz will install it into the host project at build time
```shell
# Build the plugin
@@ -475,6 +574,108 @@ npm run build
npx tsup
```
## What to Import from Where
| You need... | Import from |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------- |
| Type definitions (`QuartzTransformerPlugin`, `QuartzComponent`, etc.) | `@quartz-community/types` |
| Path utilities (`simplifySlug`, `resolveRelative`, `pathToRoot`) | `@quartz-community/utils/path` |
| DOM utilities (`removeAllChildren`, `registerEscapeHandler`) | `@quartz-community/utils/dom` |
| JSX conversion (`htmlToJsx`) | `@quartz-community/utils/jsx` |
| Language utilities (`classNames`, `capitalize`) | `@quartz-community/utils/lang` |
| Date/sort utilities (`formatDate`, `getDate`, `byDateAndAlphabetical`) | `@quartz-community/utils/date` and `@quartz-community/utils/sort` |
| HTML escaping (`escapeHTML`, `unescapeHTML`) | `@quartz-community/utils/escape` |
| Emoji utilities (`getIconCode`) | `@quartz-community/utils/emoji` |
| Browser runtime (`onNav`, `onRender`, `fetchContentIndex`) | `@quartz-community/runtime` |
Do **not** import from `@jackyzha0/quartz` or from `vfile` directly. Use the community packages instead.
## Internationalization (i18n)
Plugins should provide their own translations for user-facing strings. Do **not** hardcode strings in components.
### Setting Up i18n
Create the following structure:
```
src/i18n/
├── index.ts
└── locales/
└── en-US.ts
```
**`src/i18n/locales/en-US.ts`** (required base locale):
```ts
export default {
components: {
myPlugin: {
title: "My Plugin",
description: "A description",
itemCount: ({ count }: { count: number }) => (count === 1 ? "1 item" : `${count} items`),
},
},
}
```
**`src/i18n/index.ts`**:
```ts
import enUS from "./locales/en-US"
const locales: Record<string, typeof enUS> = {
"en-US": enUS,
}
export function i18n(locale: string) {
return locales[locale] || enUS
}
```
### Using i18n in Components
```tsx
import { i18n } from "../i18n"
const MyComponent: QuartzComponent = ({ cfg }) => {
const locale = cfg.locale ?? "en-US"
const t = i18n(locale).components.myPlugin
return <h2>{t.title}</h2>
}
```
### Adding Translations
To add a new locale, copy `en-US.ts`, translate the strings, and register it:
```ts
// src/i18n/locales/fr-FR.ts
export default {
components: {
myPlugin: {
title: "Mon Plugin",
description: "Une description",
itemCount: ({ count }: { count: number }) =>
count === 1 ? "1 élément" : `${count} éléments`,
},
},
}
```
```ts
// src/i18n/index.ts
import enUS from "./locales/en-US"
import frFR from "./locales/fr-FR"
const locales: Record<string, typeof enUS> = {
"en-US": enUS,
"fr-FR": frFR,
}
```
Use [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale codes (e.g., `en-US`, `de-DE`, `ja-JP`, `zh-CN`). For dynamic content, use function-based translations as shown with `itemCount` above.
## Installing Your Plugin
```shell
@@ -482,7 +683,7 @@ npx tsup
npx quartz plugin add github:your-username/my-plugin
```
This clones the plugin, builds it, and adds it to both `quartz.config.yaml` and `quartz.lock.json`. You can then configure it in your config:
This clones the plugin and adds it to both `quartz.config.yaml` and `quartz.lock.json`. If the plugin ships pre-built `dist/` (recommended), installation completes in seconds with no build step. You can then configure it in your config:
```yaml title="quartz.config.yaml"
plugins:
@@ -490,14 +691,21 @@ plugins:
enabled: true
```
Or via TS override in `quartz.ts`:
For options that require JavaScript callback functions (not expressible in YAML), use the TS override in `quartz.ts`:
```ts title="quartz.ts (override)"
import * as ExternalPlugin from "./.quartz/plugins"
// ...
transformers: [ExternalPlugin.MyPlugin()]
// Must be placed before loadQuartzConfig()
ExternalPlugin.MyPlugin({
customFn: (data) => {
// ...
},
})
```
Options set via `quartz.ts` are merged with YAML options at instantiation time, with `quartz.ts` overrides taking precedence. These calls must be placed **before** `loadQuartzConfig()` in your `quartz.ts`.
### Development Workflow
During plugin development, you'll frequently install and uninstall your plugin to test changes. The following commands help manage this cycle:
@@ -514,10 +722,10 @@ If you've updated your `quartz.config.yaml` to reference a plugin that isn't ins
```shell
# Install all config-referenced plugins missing from the lockfile
npx quartz plugin resolve
npx quartz plugin install --from-config
# Preview first without making changes
npx quartz plugin resolve --dry-run
npx quartz plugin install --from-config --dry-run
```
To clean up plugins that are installed but no longer referenced in your config:
@@ -536,3 +744,5 @@ npx quartz plugin prune --dry-run
## Component Plugins
For plugins that provide visual components (like Explorer, Graph, Search), see the [[creating components|creating component plugins]] guide.
Component-only plugins (those with `"category": ["component"]` in their manifest) are loaded via side-effect import rather than a factory function. If your component-only plugin needs to receive user options from `quartz.config.yaml`, export an `init(options)` function — see [[creating components#Receiving YAML Options in Component-Only Plugins|receiving YAML options]] for details.
+14 -1
View File
@@ -20,7 +20,7 @@ The `build` command transforms your Markdown content into a static HTML website.
| `--baseDir` | | Set a base directory for the site (e.g. for GitHub Pages) | `/` |
| `--remoteDevHost` | | The hostname to use for the development server | `localhost` |
| `--bundleInfo` | | Output a JSON file with bundle size information | `false` |
| `--concurrency` | | Number of worker threads to use for building | CPU core count |
| `--concurrency` | `-c` | Number of worker threads to use for building | CPU core count |
## Examples
@@ -56,6 +56,19 @@ If you have a very large vault, you can limit the number of concurrent workers t
npx quartz build --concurrency 2
```
## Serve vs Watch
The `--serve` and `--watch` flags control different behaviors:
- **`--serve`** starts a local development server AND automatically watches for changes (implies `--watch`). This is the recommended mode for local development.
- **`--watch`** only watches for file changes and rebuilds automatically, without starting a server. This is useful for CI pipelines or custom server setups where you want automatic rebuilds but handle serving separately.
In most cases, you want `--serve`:
```shell
npx quartz build --serve
```
## Development Server
The `--serve` flag starts a local web server. This server is intended for development and previewing only. It is not designed for production use. For information on how to deploy your site, see [[hosting]].
+3 -4
View File
@@ -18,11 +18,11 @@ The `create` command initializes a new Quartz project. It helps you set up your
## Templates
When you run `quartz create`, you can choose a configuration template that pre-configures Quartz for your use case:
When you run `quartz create`, you can choose a configuration template that pre-configures Quartz for your use case. The selected template always overwrites `quartz.config.yaml`, even if one already exists. After applying the template, Quartz automatically runs plugin resolution to install any plugins the template requires and remove any that are no longer referenced.
- **Default**: A clean Quartz setup with sensible defaults. Best for starting from scratch.
- **Obsidian**: Optimized for Obsidian vaults with full Obsidian Flavored Markdown support (wikilinks, callouts, mermaid diagrams, etc.). Automatically sets link resolution to `shortest` and skips the link resolution prompt.
- **TTRPG**: Builds on the Obsidian template with the addition of the [Leaflet map plugin](https://github.com/quartz-community/external-quartz-leaflet-map-plugin) and [ITS Theme](https://github.com/saberzero1/quartz-themes) (`its-theme.ttrpg-dnd`). Great for D&D and TTRPG wikis. Also skips the link resolution prompt.
- **TTRPG**: Builds on the Obsidian template with the addition of the [Leaflet bases plugin](https://github.com/Requiae/quartz-leaflet-bases-plugin) and [ITS Theme](https://github.com/saberzero1/quartz-themes) (`its-theme.ttrpg-dnd`). Great for D&D and TTRPG wikis. Also skips the link resolution prompt.
- **Blog**: A blog-focused setup with [recent notes](https://github.com/quartz-community/recent-notes) enabled (showing the 5 most recent posts with tags) and [comments](https://github.com/quartz-community/comments) enabled via giscus. You'll need to fill in the `TODO:` placeholder values in `quartz.config.yaml` with your own giscus repository details.
## Base URL
@@ -40,7 +40,6 @@ When you run `quartz create`, you must choose a strategy for your content:
- **new**: Creates a fresh, empty content folder. Use this if you are starting a new project from scratch.
- **copy**: Copies all files from your source directory into the Quartz content folder. This is the safest option for existing vaults as it doesn't touch your original files.
- **symlink**: Creates a symbolic link from the Quartz content folder to your source directory. Any changes you make in your source directory (e.g. in Obsidian) will be immediately reflected in Quartz.
- **move**: Moves your files from the source directory into the Quartz content folder.
## Link Resolution
@@ -61,7 +60,7 @@ If you run `npx quartz create` without any arguments, it will guide you through
2. **Select a strategy**: Choose between `new`, `copy`, or `symlink`.
3. **Enter base URL**: Provide the URL where your site will be hosted.
4. **Select link resolution**: Choose how your links are formatted (skipped for Obsidian and TTRPG templates).
5. **Finish**: Quartz will set up the directory structure and create your configuration.
5. **Finish**: Quartz will set up the directory structure, create your configuration, and automatically install any plugins referenced in the template.
## Example: Importing an Obsidian Vault
+21 -12
View File
@@ -13,22 +13,31 @@ You can run the CLI using `npx quartz`.
| `create` | Initialize a new Quartz project with template selection | `npx quartz create` |
| `build` | Generate static HTML files | `npx quartz build` |
| `sync` | Sync content with GitHub | `npx quartz sync` |
| `upgrade` | Upgrade Quartz to the latest version | `npx quartz upgrade` |
| `update` | Update installed plugins | `npx quartz update` |
| `plugin` | Manage Quartz plugins | `npx quartz plugin list` |
| `upgrade` | Upgrade Quartz to the latest version (alias: `update`) | `npx quartz upgrade` |
| `plugin` | Manage Quartz plugins (install, add, remove, etc.) | `npx quartz plugin list` |
| `tui` | Launch the interactive plugin manager | `npx quartz tui` |
## Commands
- [[cli/create|create]]: Initialize a new Quartz project with a choice of templates (default, obsidian, ttrpg, blog) and base URL configuration.
- [[cli/build|build]]: Build your Quartz site into static HTML. Includes a development server.
- [[cli/sync|sync]]: Push and pull changes between your local machine and GitHub.
- [[cli/upgrade|upgrade]]: Upgrade the Quartz framework to the latest version.
- [[cli/update|update]]: Update installed plugins to their latest versions.
- [[cli/restore|restore]]: Recover your content folder from the local cache.
- [[cli/migrate|migrate]]: Convert older configuration files to the new YAML format.
- [[cli/plugin|plugin]]: Install, add, remove, prune, resolve, and configure plugins from the command line.
- [[cli/tui|tui]]: Use a terminal interface to manage plugins and layout.
- [[create|create]]: Initialize a new Quartz project with a choice of templates (default, obsidian, ttrpg, blog) and base URL configuration.
- [[build|build]]: Build your Quartz site into static HTML. Includes a development server.
- [[sync|sync]]: Push and pull changes between your local machine and GitHub.
- [[upgrade|upgrade]]: Upgrade the Quartz framework to the latest version. Also available as `npx quartz update`.
- [[restore|restore]]: Recover your content folder from the local cache.
- [[cli/plugin|plugin]]: Install, add, remove, prune, and configure plugins. Use `plugin install` with flags for lockfile/config sync, updates, and checks.
- [[tui|tui]]: Use a terminal interface to manage plugins and layout.
## Global Flags
These flags are accepted by every Quartz command:
| Flag | Shorthand | Description | Default |
| --------------- | --------- | ------------------------------------------------------------------------------------------------------- | -------------- |
| `--directory` | `-d` | The directory containing your Quartz project | `content` |
| `--verbose` | `-v` | Enable detailed logging for debugging | `false` |
| `--concurrency` | `-c` | Max parallel workers for operations that run in parallel (e.g. `build`, `plugin install`, `plugin add`) | CPU core count |
Commands that don't perform parallel work accept `-c` as a no-op, so it's always safe to pass. See [[build#Performance Tuning|build]] and [[cli/plugin#Installing on low-end hardware|plugin]] for practical examples.
## Help and Versioning
-32
View File
@@ -1,32 +0,0 @@
---
title: quartz migrate
---
The `migrate` command helps you transition your project from Quartz 4 to Quartz v5 by converting your configuration files.
## When to Use
Use this command if you have an existing Quartz 4 project and want to upgrade to the new YAML-based configuration system introduced in v5.
## What it Does
When you run `npx quartz migrate`, the CLI performs several automated steps:
1. **Read Configuration**: It parses your existing `quartz.config.ts` and `quartz.layout.ts` files.
2. **Map Plugins**: It identifies the plugins you are using and maps them to their v5 equivalents.
3. **Generate YAML**: It creates a new `quartz.config.yaml` file that contains all your settings, theme colors, and plugin configurations.
4. **Backup**: It keeps your old `.ts` files so you can refer back to them if needed.
```shell
npx quartz migrate
```
## Verification
After running the migration, you should check the following:
- **Theme Colors**: Ensure your custom colors were correctly transferred to the `theme` section of `quartz.config.yaml`.
- **Plugin Options**: Verify that any custom options you passed to plugins (like `linkClickBehavior`) are present in the new config.
- **Layout**: Check that your component order in the `layout` section matches your previous setup.
For a comprehensive guide on the entire migration process, including manual steps, see [[getting-started/migrating]].
+105 -43
View File
@@ -42,7 +42,10 @@ npx quartz plugin add /absolute/path/to/plugin
Local plugins are symlinked into `.quartz/plugins/`, so any changes you make to the source directory are reflected immediately without re-installing.
When a branch is specified, it is stored in the lockfile. All subsequent commands (`install`, `update`, `restore`, `check`, `resolve`) will respect that branch automatically.
When a branch is specified, it is stored in the lockfile. All subsequent commands (`install`, `prune`) will respect that branch automatically. Use `install --latest` to fetch the latest commit from that branch.
> [!tip]
> `plugin add` also accepts `--concurrency` / `-c` to limit how many remote repositories are cloned and built at the same time. This is the same flag documented under [[#install]] and is useful when adding several plugins at once on low-end hardware.
### remove
@@ -54,27 +57,30 @@ npx quartz plugin remove plugin-name
### install
Install all plugins listed in your `quartz.lock.json` file. This is useful when setting up the project on a new machine.
Install plugins for your Quartz project. By default, this installs all plugins listed in your `quartz.lock.json` file.
```shell
npx quartz plugin install
```
### update
#### Flags
Update specific plugins or all plugins to their latest versions.
- `--from-config`: Synchronize plugins with `quartz.config.yaml` instead of the lockfile. This will install missing plugins and prune orphaned ones.
- `--latest`: Fetch the latest version of plugins from their remote sources instead of using the version in the lockfile.
- `--clean`: Skip existing directories and perform a fresh installation.
- `--dry-run`: Preview the changes without actually installing or removing any files.
- `--concurrency`, `-c`: Maximum number of plugins to clone, fetch, and build in parallel. Defaults to the number of CPU cores. Lower this (e.g. `-c 1` or `-c 2`) on memory- or CPU-constrained machines where the default parallelism causes failures, OOMs, or hangs. See [[#Installing on low-end hardware]] below.
#### Positional Arguments
- `[names..]`: Optional list of specific plugin names to install or update.
```shell
npx quartz plugin update plugin-name
npx quartz plugin update # updates all
```
# Update specific plugins to latest
npx quartz plugin install --latest plugin-a plugin-b
### restore
Restore plugins to the exact versions specified in the lockfile. Unlike `install`, this will downgrade plugins if the lockfile specifies an older version. This is recommended for CI/CD environments.
```shell
npx quartz plugin restore
# Preview what would be installed from config
npx quartz plugin install --from-config --dry-run
```
### enable / disable
@@ -98,18 +104,13 @@ npx quartz plugin config plugin-name
npx quartz plugin config plugin-name --set key=value
```
### check
Check if any of your installed plugins have updates available.
```shell
npx quartz plugin check
```
### prune
Remove installed plugins that are no longer referenced in your `quartz.config.yaml`. This is useful for cleaning up after removing plugin entries from your configuration.
> [!note]
> Running `plugin install --from-config` also removes orphaned plugins as part of its synchronization. Use `prune` when you only want to clean up without installing anything new.
```shell
npx quartz plugin prune
```
@@ -120,20 +121,6 @@ Use `--dry-run` to preview which plugins would be removed without making changes
npx quartz plugin prune --dry-run
```
### resolve
Install plugins that are listed in your `quartz.config.yaml` but missing from the lockfile. This is the inverse of `prune` — it ensures your installed plugins match your configuration.
```shell
npx quartz plugin resolve
```
Use `--dry-run` to preview which plugins would be installed without making changes:
```shell
npx quartz plugin resolve --dry-run
```
## Common Workflows
### Adding and Enabling a Plugin
@@ -148,7 +135,30 @@ To add a new plugin and start using it:
To keep your plugins fresh:
```shell
npx quartz plugin update
npx quartz plugin install --latest
```
### Installing on low-end hardware
By default, `plugin install` and `plugin add` clone, fetch, and build plugins in parallel across all your CPU cores. On memory-constrained machines (low-end laptops, Raspberry Pi, small VPS instances, restrictive CI runners) this can exhaust RAM or overwhelm the system because each worker may kick off its own `npm install` / `npm run build` at the same time.
> [!note]
> Most community plugins now ship with a pre-built `dist/` directory. When Quartz finds this, it skips the installation and build steps entirely, making the process much faster and lighter on resources. This section is primarily relevant for plugins in development or those that don't provide pre-built distribution.
If `plugin install` fails, hangs, or OOMs on your machine, lower the concurrency with `--concurrency` / `-c`:
```shell
# Install one plugin at a time (safest, slowest)
npx quartz plugin install --latest -c 1
# Two at a time — usually a good balance on 4 GB machines
npx quartz plugin install --latest --concurrency 2
```
The same flag works on `plugin add` and the other plugin subcommands that perform parallel work:
```shell
npx quartz plugin add github:quartz-community/some-plugin -c 1
```
### Managing Configuration
@@ -170,10 +180,10 @@ npx quartz plugin prune # remove orphaned plugins
### Setting Up from Config
When setting up on a new machine or in CI, resolve any plugins referenced in your config that aren't yet installed:
When setting up on a new machine or in CI, `install --from-config` ensures your installed plugins match your config — installing missing plugins and removing any that are no longer referenced:
```shell
npx quartz plugin resolve
npx quartz plugin install --from-config
```
### Testing with Branches
@@ -189,9 +199,9 @@ npx quartz plugin remove repo
npx quartz plugin add github:username/repo
```
The branch ref is tracked in `quartz.lock.json`, so `update` and `check` will continue to follow the specified branch until the plugin is re-added without one.
The branch ref is tracked in `quartz.lock.json`, so `install --latest` will continue to follow the specified branch until the plugin is re-added without one.
Both `prune` and `resolve` will fall back to `quartz.config.default.yaml` if no `quartz.config.yaml` is present.
Both `prune` and `install --from-config` will fall back to `quartz.config.default.yaml` if no `quartz.config.yaml` is present.
### Local Plugin Development
@@ -201,7 +211,12 @@ For local plugin development or airgapped environments, you can add a plugin fro
npx quartz plugin add ./my-local-plugin
```
Local plugins are symlinked into `.quartz/plugins/`, so changes reflect immediately. When you run `update`, local plugins are rebuilt (npm install + npm run build) without any git operations. The `check` command will show local plugins with a "local" status instead of checking for remote updates.
Local plugins are symlinked into `.quartz/plugins/`, so changes reflect immediately. When you run `install --latest`, local plugins are rebuilt (npm install + npm run build) without any git operations.
> [!note]
> Local symlinked plugins typically use this build-on-install fallback because the `dist/` directory is usually gitignored during development.
The `install --latest --dry-run` command will show local plugins with a "local" status instead of checking for remote updates.
To switch a local plugin back to a git source:
@@ -210,10 +225,57 @@ npx quartz plugin remove my-local-plugin
npx quartz plugin add github:username/my-local-plugin
```
## Interactive Mode
### Subdirectory (Monorepo) Plugins
Running the plugin command without any subcommand will launch the [[cli/tui|TUI]], which provides a visual interface for all these operations.
Some plugins live in a subdirectory of a larger repository rather than at the root. For these, you can specify the plugin source as an object in `quartz.config.yaml` with a `subdir` field:
```yaml title="quartz.config.yaml"
plugins:
- source:
repo: "https://github.com/username/monorepo.git"
subdir: plugin
enabled: true
```
This tells Quartz to clone the full repository but install only the contents of the specified subdirectory.
You can combine `subdir` with `ref` to pin a branch or tag, and `name` to override the plugin directory name:
```yaml title="quartz.config.yaml"
plugins:
- source:
repo: "https://github.com/username/monorepo.git"
subdir: packages/my-plugin
ref: v2.0
name: my-plugin
enabled: true
```
See [[configuration#Advanced Source Options|Advanced Source Options]] for the full reference on object source fields.
> [!note]
> The `plugin add` CLI command works with string sources. To use the object source format with `subdir`, edit `quartz.config.yaml` directly, then run `npx quartz plugin install --from-config` to install it.
## Migration from Deprecated Commands
| Old command | New equivalent |
| ------------------------------------- | --------------------------------------------------- |
| `npx quartz plugin restore` | `npx quartz plugin install --clean` |
| `npx quartz plugin update` | `npx quartz plugin install --latest` |
| `npx quartz plugin update my-plugin` | `npx quartz plugin install --latest my-plugin` |
| `npx quartz plugin check` | `npx quartz plugin install --latest --dry-run` |
| `npx quartz plugin resolve` | `npx quartz plugin install --from-config` |
| `npx quartz plugin resolve --dry-run` | `npx quartz plugin install --from-config --dry-run` |
| `npx quartz update` | `npx quartz plugin install --latest` |
The old commands still work as hidden aliases but will print a deprecation warning.
## Plugin Status
Running the plugin command without any subcommand shows a status dashboard of all installed plugins, including whether updates are available:
```shell
npx quartz plugin
```
This displays each plugin with its source, commit, enabled/disabled status, and checks for available updates in parallel. For the full interactive management interface, use [[tui|npx quartz tui]] instead.
+3 -1
View File
@@ -2,7 +2,9 @@
title: quartz restore
---
The `restore` command is a safety mechanism that allows you to recover your content folder from a local cache.
The `restore` command is a safety mechanism that allows you to recover your **content folder** from a local cache. This command only affects your Markdown files and does not restore plugins or configuration.
To restore plugins to a specific state, use [[cli/plugin|npx quartz plugin install]].
## When to Use
+1 -1
View File
@@ -71,4 +71,4 @@ If you have a very large number of changes, Git might occasionally fail due to b
Quartz uses `git pull --rebase --autostash` internally. This means if you have unstaged changes when you run `sync`, Quartz will temporarily hide them, pull the remote changes, and then bring your changes back. If a conflict occurs during this process, you will need to resolve it manually using standard Git tools.
For more information on initial setup, see [[getting-started/installation]].
For more information on initial setup, see [[installation]].
-38
View File
@@ -1,38 +0,0 @@
---
title: quartz update
---
The `update` command updates your installed plugins to their latest versions. It is a convenient shortcut for `npx quartz plugin update`.
## Usage
Update all installed plugins:
```shell
npx quartz update
```
Update specific plugins by name:
```shell
npx quartz update my-plugin another-plugin
```
## How it Works
For each plugin, `update` fetches the latest commit from the plugin's remote repository and rebuilds it. If a plugin was installed from a specific branch (e.g., `github:user/repo#my-branch`), updates will track that branch instead of the default branch. Local plugins (added from a file path) are rebuilt without any git operations. The lockfile (`quartz.lock.json`) is updated with the new commit hashes.
This is functionally identical to running:
```shell
npx quartz plugin update
```
## Flags
The `update` command supports the standard [[cli/index|common flags]] (`--directory`, `--verbose`).
## See Also
- [[cli/upgrade|quartz upgrade]] — upgrade the Quartz framework itself
- [[cli/plugin|quartz plugin]] — full plugin management (install, remove, enable, disable, etc.)
+7 -5
View File
@@ -25,7 +25,9 @@ When you run `npx quartz upgrade`, Quartz performs the following steps:
Because Quartz allows you to customize almost every part of the code, upgrades can sometimes result in merge conflicts. This happens if you have modified a file that the Quartz team has also updated.
If a conflict occurs:
Quartz automatically handles merge conflicts in `quartz.lock.json` by backing up your lockfile before pulling and restoring it afterward. This prevents the most common source of conflicts during upgrades.
For other files, if a conflict occurs:
1. Git will mark the conflicting sections in the affected files.
2. You will need to open these files and manually choose which changes to keep.
@@ -33,7 +35,7 @@ If a conflict occurs:
## Recovery
If an upgrade goes wrong or leaves your project in an unusable state, you can use the [[cli/restore|restore]] command to recover your content from the local cache.
If an upgrade goes wrong or leaves your project in an unusable state, you can use the [[restore|restore]] command to recover your content from the local cache.
## Flags
@@ -41,6 +43,6 @@ The `upgrade` command supports the standard [[cli/index|common flags]] (`--direc
## See Also
- [[cli/update|quartz update]] — update installed plugins
- [[getting-started/upgrading|Upgrading Quartz]] — detailed upgrading guide
- [[cli/restore|quartz restore]] — recover content from cache
- [[cli/plugin|quartz plugin install --latest]] — update installed plugins
- [[upgrading|Upgrading Quartz]] — detailed upgrading guide
- [[restore|quartz restore]] — recover content from cache
+1 -1
View File
@@ -12,7 +12,7 @@ Quartz has a vibrant community of users and contributors. This page highlights c
Third-party plugins that extend Quartz functionality. Install them with the [[cli/plugin|plugin CLI]]:
```bash
npx quartz plugin install <github-url>
npx quartz plugin add <github-url>
```
<!-- Add community plugins here as they become available -->
+77 -4
View File
@@ -42,12 +42,14 @@ This part of the configuration concerns anything that can affect the whole site.
- `{ provider: 'rybbit', siteId: 'my-rybbit-id' }` (managed) or `{ provider: 'rybbit', siteId: 'my-rybbit-id', host: 'my-rybbit-domain.com' }` (self-hosted) use [Rybbit](https://rybbit.com);
- `locale`: used for [[i18n]] and date formatting
- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
- You will be prompted to set this during [[cli/create|`npx quartz create`]]. The CLI automatically strips any `https://` or `http://` protocol prefixes and trailing slashes for you.
- You will be prompted to set this during [[create|`npx quartz create`]]. The CLI automatically strips any `https://` or `http://` protocol prefixes and trailing slashes for you.
- This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`.
- Note that Quartz 5 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter _where_ you end up actually deploying it.
- `ignorePatterns`: a list of [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) patterns that Quartz should ignore and not search through when looking for files inside the `content` folder. See [[private pages]] for more details.
- `defaultDateType`: whether to use created, modified, or published as the default date to display on pages and page listings.
- `theme`: configure how the site looks.
- `fontOrigin`: where to load fonts from.
- `"googleFonts"` (default): loads fonts from Google Fonts API. Fastest option, especially with CDN caching enabled.
- `"local"`: downloads fonts and serves them from your site. Fully self-contained with no external requests.
- `cdnCaching`: if `true` (default), use Google CDN to cache the fonts. This will generally be faster. Disable (`false`) this if you want Quartz to download the fonts to be self-contained.
- `typography`: what fonts to use. Any font available on [Google Fonts](https://fonts.google.com/) works here.
- `title`: font for the title of the site (optional, same as `header` by default)
@@ -146,7 +148,7 @@ This adds the plugin to `quartz.config.yaml` and installs it to `.quartz/plugins
To install all plugins referenced in your config that aren't yet installed (useful when cloning a project or setting up CI):
```shell
npx quartz plugin resolve
npx quartz plugin install --from-config
```
To remove installed plugins that are no longer in your config:
@@ -157,6 +159,55 @@ npx quartz plugin prune
Both commands support `--dry-run` to preview changes. See [[cli/plugin|the plugin CLI reference]] for full details.
### Advanced Source Options
The `source` field for a plugin can be either a simple string or an object with additional options. The string form is the most common:
```yaml title="quartz.config.yaml"
plugins:
- source: github:quartz-community/explorer
enabled: true
```
For plugins that live in a subdirectory of a repository (monorepo-style), or when you need to pin to a specific branch or tag, use the object form:
```yaml title="quartz.config.yaml"
plugins:
- source:
repo: "https://github.com/user/repo.git"
subdir: plugin
ref: main
name: my-plugin
enabled: true
```
The object form supports the following fields:
| Field | Required | Description |
| -------- | :------: | --------------------------------------------------------------------------------------------------------- |
| `repo` | ✅ | Git repository URL (e.g. `https://github.com/user/repo.git`). |
| `subdir` | ❌ | Subdirectory within the repository that contains the plugin. Used for monorepo-style plugin repositories. |
| `ref` | ❌ | Git ref (branch or tag) to pin to. Equivalent to the `#ref` suffix on string sources. |
| `name` | ❌ | Override the directory name used in `.quartz/plugins/`. Defaults to the repository name. |
> [!example] Real-world example
> The [quartz-themes](https://github.com/saberzero1/quartz-themes) plugin lives in the `plugin/` subdirectory of its repository. To install it:
>
> ```yaml title="quartz.config.yaml"
> plugins:
> - source:
> name: quartz-themes
> repo: "https://github.com/saberzero1/quartz-themes.git"
> subdir: plugin
> enabled: true
> options:
> theme: "tokyo-night"
> mode: both
> ```
> [!tip]
> The string form `github:user/repo#branch` and the object form `{ repo, ref }` are equivalent ways to specify a branch. Use the object form when you also need `subdir` or `name`, or when you prefer a more readable configuration.
### Usage
You can customize the behaviour of Quartz by adding, removing and reordering plugins in `quartz.config.yaml`. Each plugin entry specifies its source, whether it's enabled, execution order, and any options:
@@ -188,7 +239,25 @@ plugins:
```
> [!note]
> For advanced options that require JavaScript (e.g. callback functions), use the TS override in `quartz.ts`. See the plugin-specific documentation for details.
> Some plugin options require JavaScript callback functions (e.g. custom sort, filter, or map functions) that can't be expressed in YAML. For these, use the TS override in `quartz.ts`:
>
> ```ts title="quartz.ts"
> import { loadQuartzConfig, loadQuartzLayout } from "./quartz/plugins/loader/config-loader"
> import * as ExternalPlugin from "./.quartz/plugins"
>
> ExternalPlugin.Explorer({
> mapFn: (node) => {
> node.displayName = node.displayName.toUpperCase()
> return node
> },
> })
>
> const config = await loadQuartzConfig()
> export default config
> export const layout = await loadQuartzLayout()
> ```
>
> Options set in `quartz.ts` are merged with YAML options and take precedence. Plugin overrides must be placed **before** `loadQuartzConfig()` so they are applied when components are instantiated during config loading. See the plugin-specific documentation for available callback options.
You can see a list of all plugins and their configuration options [[tags/plugin|here]].
@@ -202,6 +271,7 @@ Fonts can be specified as a simple string or with advanced options in `quartz.co
configuration:
theme:
typography:
title: Schibsted Grotesk # optional, defaults to header font
header: Schibsted Grotesk
body: Source Sans Pro
code: IBM Plex Mono
@@ -228,3 +298,6 @@ const config = await loadQuartzConfig({
export default config
export const layout = await loadQuartzLayout()
```
> [!tip]
> For per-heading font control, self-hosted fonts, or Obsidian theme font bridging, see the [[plugins/Fonts|Fonts]] plugin. It can download Google Fonts at build time and serve them locally with `fontOrigin: selfHosted`, making your site fully self-contained.
+24
View File
@@ -194,6 +194,30 @@ Video files can be embedded using standard image syntax:
By default, Obsidian does not render its Markdown syntax inside HTML blocks. Quartz extends this with the `enableInHtmlEmbed` option, which parses wikilinks, highlights, and tags inside raw HTML nodes.
### Footnotes
Footnotes using the `[^1]` syntax are fully supported through the [[GitHubFlavoredMarkdown]] plugin:
```markdown
Here is a sentence with a footnote.[^1]
[^1]: This is the footnote content.
```
## Obsidian Community Plugin Support
Quartz focuses on supporting Obsidian's core features. Functionality from Obsidian community plugins is handled by Quartz community plugins:
| Obsidian Plugin | Quartz Support |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Dataview | Supported via [Quartz Syncer](https://community.obsidian.md/plugins/quartz-syncer) — exports Dataview queries as static content during sync |
| Excalidraw | Supported via the `obsidian-plugin-excalidraw` community plugin |
| Leaflet Maps | Supported via the `obsidian-plugin-leaflet` community plugin |
| Style Settings | Supported via the `quartz-themes` community plugin |
> [!tip]
> As a general rule: Obsidian core features are supported by Quartz directly, while Obsidian community plugin features are supported by corresponding Quartz community plugins. Not all Obsidian community plugins will have Quartz equivalents, but popular ones are likely to be supported by the community.
## Configuration
This functionality is provided by the [[ObsidianFlavoredMarkdown]], [[Frontmatter]] and [[CrawlLinks]] plugins. See the plugin pages for customization options.
+5 -10
View File
@@ -27,18 +27,13 @@ plugins:
order: 5
```
For the TS override approach:
For the TS override approach, place overrides before `loadQuartzConfig()` in `quartz.ts`:
```ts title="quartz.ts (override)"
plugins: {
transformers: [
ExternalPlugin.FrontMatter({ delims: "+++", language: "toml" }),
// ...
ExternalPlugin.OxHugoFlavouredMarkdown(),
ExternalPlugin.GitHubFlavoredMarkdown(),
// ...
],
}
import * as ExternalPlugin from "./.quartz/plugins"
ExternalPlugin.NoteProperties({ delims: "+++", language: "toml" })
ExternalPlugin.OxHugoFlavouredMarkdown()
```
> [!note]
+4 -9
View File
@@ -19,17 +19,12 @@ plugins:
order: 30
```
For the TS override approach:
For the TS override approach, place overrides before `loadQuartzConfig()` in `quartz.ts`:
```ts title="quartz.ts (override)"
plugins: {
transformers: [
// ...
ExternalPlugin.RoamFlavoredMarkdown(),
ExternalPlugin.ObsidianFlavoredMarkdown(),
// ...
],
}
import * as ExternalPlugin from "./.quartz/plugins"
ExternalPlugin.RoamFlavoredMarkdown()
```
> [!warning]
+1
View File
@@ -34,6 +34,7 @@ plugins:
For the TS override approach:
```ts title="quartz.ts (override)"
// Must be placed before loadQuartzConfig()
ExternalPlugin.Breadcrumbs({
spacerSymbol: "❯",
rootName: "Home",
+25 -14
View File
@@ -63,10 +63,10 @@ For advanced options like custom sort, filter, and map functions, use the TS ove
```ts title="quartz.ts"
import { loadQuartzConfig, loadQuartzLayout } from "./quartz/plugins/loader/config-loader"
import { Explorer } from "@quartz-community/explorer"
import * as ExternalPlugin from "./.quartz/plugins"
// Advanced: pass callback functions that can't be expressed in YAML
Explorer({
ExternalPlugin.Explorer({
sortFn: (a, b) => {
/* ... */
},
@@ -84,6 +84,16 @@ export default config
export const layout = await loadQuartzLayout()
```
> [!info] How overrides work
> When you call `ExternalPlugin.Explorer({...})` in `quartz.ts`, the options are recorded and merged with the YAML configuration when the component is instantiated during the build. Options set in `quartz.ts` take precedence over those in `quartz.config.yaml`, following this order: `plugin defaults < YAML options < quartz.ts overrides`.
>
> If you have two plugins that export the same name (e.g. two different Explorer plugins installed via `--name`), use the `plugins` map to disambiguate:
>
> ```ts title="quartz.ts"
> import * as ExternalPlugin from "./.quartz/plugins"
> ExternalPlugin.plugins["my-explorer"].Explorer({ mapFn: ... })
> ```
When passing in your own options, you can omit any or all of these fields if you'd like to keep the default value for that field.
Want to customize it even more?
@@ -119,7 +129,7 @@ Every function you can pass is optional. By default, only a `sort` function will
```ts title="Default sort function"
// Sort order: folders first, then files. Sort folders and files alphabetically
Explorer({
ExternalPlugin.Explorer({
sortFn: (a, b) => {
if ((!a.isFolder && !b.isFolder) || (a.isFolder && b.isFolder)) {
return a.displayName.localeCompare(b.displayName, undefined, {
@@ -172,7 +182,7 @@ plugins:
Custom sort functions require the TS override:
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
sortFn: (a, b) => {
return a.displayName.localeCompare(b.displayName)
},
@@ -184,7 +194,7 @@ Explorer({
Using this example, the display names of all `FileNodes` (folders + files) will be converted to full upper case.
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
mapFn: (node) => {
node.displayName = node.displayName.toUpperCase()
return node
@@ -201,7 +211,7 @@ Using this example, you can remove elements from your explorer by providing an a
Note that this example filters on the title but you can also do it via slug or any other field available on `FileTrieNode`.
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
filterFn: (node) => {
// set containing names of everything you want to filter out
const omit = new Set(["authoring content", "tags", "advanced"])
@@ -219,7 +229,7 @@ Explorer({
You can access the tags of a file by `node.data.tags`.
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
filterFn: (node) => {
// exclude files with the tag "explorerexclude"
return node.data?.tags?.includes("explorerexclude") !== true
@@ -233,7 +243,7 @@ By default, the explorer will filter out the `tags` folder.
To override the default filter function, you can set the filter function to `undefined`.
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
filterFn: undefined, // apply no filter function, every file and folder will visible
})
```
@@ -246,19 +256,20 @@ Explorer({
> and passing it in.
>
> ```ts title="quartz.ts"
> import { ExplorerOptions } from "@quartz-community/explorer/components"
> import * as ExternalPlugin from "./.quartz/plugins"
> import type { ExplorerOptions } from "./.quartz/plugins"
>
> export const mapFn: ExplorerOptions["mapFn"] = (node) => {
> const mapFn: ExplorerOptions["mapFn"] = (node) => {
> // implement your function here
> }
> export const filterFn: ExplorerOptions["filterFn"] = (node) => {
> const filterFn: ExplorerOptions["filterFn"] = (node) => {
> // implement your function here
> }
> export const sortFn: ExplorerOptions["sortFn"] = (a, b) => {
> const sortFn: ExplorerOptions["sortFn"] = (a, b) => {
> // implement your function here
> }
>
> Explorer({
> ExternalPlugin.Explorer({
> // ... your other options
> mapFn,
> filterFn,
@@ -271,7 +282,7 @@ Explorer({
To add emoji prefixes (📁 for folders, 📄 for files), you could use a map function in `quartz.ts`:
```ts title="quartz.ts (override)"
Explorer({
ExternalPlugin.Explorer({
mapFn: (node) => {
if (node.isFolder) {
node.displayName = "📁 " + node.displayName
+8 -8
View File
@@ -9,12 +9,12 @@ Quartz comes with a wide variety of features out of the box. Most features are p
- [[Obsidian compatibility]] — Full support for Obsidian-flavored Markdown
- [[wikilinks]] — Link between notes using `[[wikilinks]]` syntax
- [[callouts]] — Obsidian-style callout blocks
- [[Latex]] — LaTeX math rendering
- [[features/Latex|Latex]] — LaTeX math rendering
- [[Mermaid diagrams]] — Diagram support via Mermaid
- [[syntax highlighting]] — Code block highlighting with themes
- [[syntax highlighting|Syntax highlighting]] — Code block highlighting with themes
- [[OxHugo compatibility]] — Support for ox-hugo Markdown
- [[Roam Research compatibility]] — Support for Roam Research syntax
- [[Citations]] — Academic citation support
- [[features/Citations|Citations]] — Academic citation support
- [[Canvas]] — Render Obsidian Canvas files as interactive pages
- [[Bases]] — Database-like views for your notes (tables, cards, galleries, and more)
@@ -22,9 +22,9 @@ Quartz comes with a wide variety of features out of the box. Most features are p
- [[full-text search]] — Search across all your notes
- [[graph view]] — Interactive graph visualization of note connections
- [[backlinks]] — See which notes link to the current page
- [[explorer]] — File tree sidebar for browsing notes
- [[breadcrumbs]] — Breadcrumb navigation trail
- [[features/backlinks]] — See which notes link to the current page
- [[features/explorer]] — File tree sidebar for browsing notes
- [[features/breadcrumbs]] — Breadcrumb navigation trail
- [[table of contents]] — Per-page table of contents
- [[folder and tag listings]] — Browse notes by folder or tag
- [[recent notes]] — Display recently modified notes
@@ -34,9 +34,9 @@ Quartz comes with a wide variety of features out of the box. Most features are p
## Appearance & Reading
- [[darkmode]] — Light and dark mode toggle
- [[features/darkmode]] — Light and dark mode toggle
- [[reader mode]] — Distraction-free reading experience
- [[comments]] — Add comments via Giscus, Utterances, or other providers
- [[features/comments|comments]] — Add comments via Giscus, Utterances, or other providers
- [[social images]] — Auto-generated Open Graph images for social sharing
## Publishing & Deployment
+2
View File
@@ -15,6 +15,8 @@ Most options are configured in the `options` section of the plugin entry in `qua
- Changing the title from "Recent notes": set `title: "Recent writing"` in options
- Changing the number of recent notes: set `limit: 5` in options
- Display the note's tags (defaults to true): set `showTags: false` in options
- Hide generated tag pages from the list (defaults to false): set `hideTagPages: true` in options. This filters out any page whose slug lives under the conventional `tags/` prefix.
- Hide generated folder index pages from the list (defaults to false): set `hideFolderPages: true` in options. This filters out any page whose slug matches Quartz's folder-path convention (trailing slash or `index` suffix).
- Show a 'see more' link: set `linkToMore: "tags/components"` in options. This field should be a full slug to a page that exists.
- Customize filtering: requires a TS override — pass `filter: someFilterFunction` to the plugin constructor in `quartz.ts`. The filter function should have the signature `(f: QuartzPluginData) => boolean`.
- Customize sorting: requires a TS override — pass `sort: someSortFunction` to the plugin constructor in `quartz.ts`. By default, Quartz will sort by date and then tie break lexographically. The sort function should have the signature `(f1: QuartzPluginData, f2: QuartzPluginData) => number`.
+2
View File
@@ -8,6 +8,8 @@ Quartz supports Wikilinks by default and these links are resolved by Quartz usin
This is enabled as a part of [[Obsidian compatibility]] and can be configured and enabled/disabled from that plugin.
Wikilink matching is case-insensitive to mirror Obsidian: `[[My Note]]`, `[[my note]]`, and `[[MY NOTE]]` all resolve to the same file. The generated URL is lowercased (e.g. `my-note`).
## Syntax
- `[[Path to file]]`: produces a link to `Path to file.md` (or `Path-to-file.md`) with the text `Path to file`
+3 -3
View File
@@ -4,11 +4,11 @@ aliases:
- "authoring content"
---
All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[index#🪴 Get Started|setup Quartz]] already, this folder should already be initialized. Any Markdown in this folder will get processed by Quartz.
All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've followed the [[installation|installation guide]], this folder should already be initialized. Any Markdown in this folder will get processed by Quartz.
It is recommended that you use [Obsidian](https://obsidian.md/) as a way to edit and maintain your Quartz. It comes with a nice editor and graphical interface to preview, edit, and link your local files and attachments.
Got everything setup? Let's [[build]] and preview your Quartz locally!
Got everything set up? Preview your site locally with `npx quartz build --serve`, or see the [[build|build reference]] for more options.
## Syntax
@@ -42,7 +42,7 @@ See [[Frontmatter]] for a complete list of frontmatter.
## Syncing your Content
When your Quartz is at a point you're happy with, you can save your changes to GitHub.
First, make sure you've [[getting-started/installation|already setup your GitHub repository]] and then do `npx quartz sync`.
First, make sure you've [[installation#Setting Up Your GitHub Repository|set up your GitHub repository]] and then run `npx quartz sync`.
## Customization
+25 -8
View File
@@ -2,16 +2,33 @@
title: Getting Started
---
Welcome to Quartz! This section will walk you through setting up your digital garden from scratch.
This guide walks you through setting up Quartz from scratch. If you already ran the [[index#🪴 Get Started|quickstart]] on the home page, you can skip ahead to whichever step you're on.
## Setup
## Prerequisites
1. **[[getting-started/installation|Installation]]** — Clone Quartz, create your repository, and push your first sync
2. **[[getting-started/authoring-content|Authoring Content]]** — Write and organize your notes in the `content` folder
3. **[[build|Building]]** — Preview your site locally with `npx quartz build --serve`
4. **[[hosting|Hosting]]** — Deploy your Quartz site to the web
You need these tools installed before continuing:
- **[Node.js](https://nodejs.org/) v22 or later** (run `node -v` to check)
- **npm v10.9.2 or later** (bundled with Node — run `npm -v` to check)
- **[Git](https://git-scm.com/)** (run `git -v` to check)
> [!warning] Common issues
>
> - **Linux**: System packages (`apt install nodejs`) often ship much older versions. Use [nvm](https://github.com/nvm-sh/nvm) or the [NodeSource](https://github.com/nodesource/distributions) repository to get Node.js v22.
> - **Windows**: When installing Git, make sure **"Git from the command line and also from 3rd-party software"** is selected so that `git` is available in your terminal. If `node -v` or `git -v` shows "command not found", restart your terminal or check your PATH.
> - **macOS**: The Xcode command-line tools include Git (`xcode-select --install`). For Node.js, [nvm](https://github.com/nvm-sh/nvm) or the [official installer](https://nodejs.org/) both work.
## Setup Steps
Follow these in order:
1. **[[installation|Installation]]** — Get Quartz (via GitHub template or clone), install dependencies, run the setup wizard (`npx quartz create`), install plugins, and preview your site locally
2. **[[authoring-content|Authoring Content]]** — Write and organize your Markdown notes in the `content/` folder
3. **[[installation#Setting Up Your GitHub Repository|Push to GitHub]]** — Create a repository and push your site with `npx quartz sync`
4. **[[hosting|Deploy]]** — Host your site for free on GitHub Pages, Cloudflare, Netlify, or Vercel
## Upgrading & Migrating
- **[[getting-started/upgrading|Upgrading Quartz]]** — Keep your Quartz installation up to date
- **[[getting-started/migrating|Migrating to Quartz 5]]** — Migrate from Quartz 4 or Quartz 3
- **[[whats-new|What's New in Quartz 5]]** — Overview of new features and changes
- **[[upgrading|Upgrading Quartz]]** — Keep your Quartz installation up to date
- **[[migrating|Migrating to Quartz 5]]** — Migrate from Quartz 4 or Quartz 3
+124 -20
View File
@@ -4,46 +4,144 @@ aliases:
- "setting up your GitHub repository"
---
First, make sure you have Quartz [[index#🪴 Get Started|cloned and setup locally]].
This page walks you through the full Quartz setup: from getting the source code to previewing your site locally, then pushing it to GitHub.
Then, create a new repository on GitHub.com. Do **not** initialize the new repository with `README`, license, or `gitignore` files.
## 1. Get Quartz
There are two ways to get started. Pick whichever you prefer:
### Option A: Use the GitHub Template (Recommended)
> [!tip] Why this option?
> Using the template creates your own repository in one click — no need to reconfigure Git remotes later.
1. Go to the [Quartz repository](https://github.com/jackyzha0/quartz) and click **Use this template** → **Create a new repository**
2. Give your repository a name (e.g. `quartz`, `notes`, `garden`), choose public or private, then click **Create repository**
3. Clone **your new repository** and enter the folder:
```bash
git clone https://github.com/<your-username>/<your-repo>.git
cd <your-repo>
```
### Option B: Clone Directly
If you don't use GitHub or prefer a manual setup:
```bash
git clone https://github.com/jackyzha0/quartz.git
cd quartz
```
> [!note]
> With this option, you'll need to [[#Connect Your Local Clone|point the `origin` remote]] to your own repository later when you're ready to publish.
## 2. Install Dependencies
> [!important]
> Quartz requires **Node.js 22** or later. Check your version with `node -v` and upgrade at [nodejs.org](https://nodejs.org/) if needed.
```bash
npm i
```
> [!note]
> On subsequent clones of your own repository (e.g. on a new machine), use `npm ci` instead for a faster, reproducible install from the lockfile.
## 3. Initialize Your Site
Run the interactive setup wizard:
```bash
npx quartz create
```
This will prompt you for:
- A **template** (`default`, `obsidian`, `ttrpg`, `blog`) — pick the one that matches your use case. See [[create#Templates]] for details on each.
- A **content strategy** — choose how to populate the `content/` folder:
- **new**: Start with an empty folder
- **copy**: Copy files from an existing folder (e.g. your Obsidian vault)
- **symlink**: Link to an existing folder so changes sync automatically
- A **base URL** — the URL where your site will be deployed (e.g. `mysite.github.io/quartz`). Don't include `https://`.
- A **link resolution** strategy — how to resolve internal links (`shortest`, `absolute`, or `relative`). Skipped for Obsidian and TTRPG templates.
For non-interactive usage and more details, see the [[create|`quartz create` CLI reference]].
## 4. Install Plugins
The template you chose references community plugins that need to be installed:
```bash
npx quartz plugin install --from-config
```
This downloads and builds all plugins listed in `quartz.config.yaml` into `.quartz/plugins/`.
> [!tip]
> If some plugins fail to build, try refreshing them to their latest versions:
>
> ```bash
> npx quartz plugin install --latest
> ```
>
> See [[troubleshooting#Plugins fail to build on a fresh clone]] for more details.
## 5. Preview Your Site
```bash
npx quartz build --serve
```
Your site is now running at `http://localhost:8080`. The dev server watches for file changes and reloads automatically.
At this point you can [[authoring-content|start writing content]] in the `content/` folder. When you're ready to publish, continue below to push your site to GitHub and [[hosting|deploy it]].
---
## Setting Up Your GitHub Repository
> [!note]
> If you used **Option A** (GitHub Template) in step 1, your repository already exists and `origin` is already set. You can skip straight to [[#Push Your Site]].
To publish your site, you'll need your own GitHub repository. This section is for **Option B** (direct clone) users.
### Create the Repository
Create a new repository on [GitHub.com](https://github.com/new). Do **not** initialize it with a README, license, or `.gitignore` — Quartz already includes these files, and duplicating them will cause merge conflicts on your first push.
![[github-init-repo-options.png]]
At the top of your repository on GitHub.com's Quick Setup page, click the clipboard to copy the remote repository URL.
Copy the repository URL from the Quick Setup page:
![[github-quick-setup.png]]
In your terminal of choice, navigate to the root of your Quartz folder. Then, run the following commands, replacing `REMOTE-URL` with the URL you just copied from the previous step.
### Connect Your Local Clone
Point your local Quartz at your new repository:
```bash
# list all the repositories that are tracked
# Check current remotes
git remote -v
# if the origin doesn't match your own repository, set your repository as the origin
# Point origin to your repository
git remote set-url origin REMOTE-URL
# if you don't have upstream as a remote, add it so updates work
git remote add upstream https://github.com/jackyzha0/quartz.git
```
Then, you can sync the content to upload it to your repository. This is a helper command that will do the initial push of your content to your repository.
> [!tip]
> You don't need to add an `upstream` remote manually — `npx quartz create` already configured it for you. The upstream remote is used by `npx quartz upgrade` to pull in future Quartz updates.
### Push Your Site
```bash
npx quartz sync --no-pull
```
> [!warning]- `fatal: --[no-]autostash option is only valid with --rebase`
> You may have an outdated version of `git`. Updating `git` should fix this issue.
This commits your content and pushes everything to your repository. For subsequent updates, just run:
> [!warning]- `fatal: The remote end hung up unexpectedly`
> It might be due to Git's default buffer size. You can fix it by increasing the buffer with this command:
>
> ```bash
> git config http.postBuffer 524288000
> ```
In future updates, you can simply run `npx quartz sync` every time you want to push updates to your repository.
```bash
npx quartz sync
```
> [!hint] Flags and options
> For full help options, you can run `npx quartz sync --help`.
@@ -55,3 +153,9 @@ In future updates, you can simply run `npx quartz sync` every time you want to p
> - `--commit` or `--no-commit`: whether to make a `git` commit for your changes
> - `--push` or `--no-push`: whether to push updates to your GitHub fork of Quartz
> - `--pull` or `--no-pull`: whether to try and pull in any updates from your GitHub fork (i.e. from other devices) before pushing
## Next Steps
- **[[authoring-content|Authoring Content]]** — Write and organize your notes
- **[[hosting|Hosting]]** — Deploy your site to GitHub Pages, Cloudflare, Netlify, or Vercel
- **[[configuration|Configuration]]** — Customize your site's appearance and behavior
+157 -288
View File
@@ -5,276 +5,111 @@ aliases:
- "migrating from Quartz 4"
---
This guide covers migrating to Quartz 5 from previous versions. If you're already on Quartz 5 and want to update to the latest version, see [[getting-started/upgrading|Upgrading Quartz]] instead.
This guide covers migrating to Quartz 5 from previous versions. If you're already on Quartz 5 and want to update to the latest version, see [[upgrading|Upgrading Quartz]] instead.
## Migrating from Quartz 4
If you're new to Quartz entirely, skip this guide and follow the [[installation|installation guide]] instead.
### Overview
## Before You Start: Save Your Content
Quartz 5 introduces a community plugin system that fundamentally changes how plugins and components are managed. Most plugins that were built into Quartz 4 are now standalone community plugins maintained under the [quartz-community](https://github.com/quartz-community) organization. This guide walks through the changes needed to migrate your configuration.
Before switching branches, make sure your content is safe. Switching to v5 will replace the files in your working directory with the v5 codebase, so your v4 content folder won't be visible until you restore it.
### What Changed
Copy your content folder somewhere outside the repo before switching:
```bash
# macOS / Linux
cp -r content /tmp/quartz-content
# Windows (PowerShell)
Copy-Item -Recurse content $env:TEMP\quartz-content
```
> [!note] Your old branch is preserved
> Switching branches does **not** delete your v4 (or v3/hugo) branch. You can always switch back with `git checkout v4` to access your old content and configuration.
## Getting the v5 Branch
Whether you're coming from Quartz 4 or Quartz 3, the first step is the same: get the v5 branch onto your machine and push it to your repository.
```bash
# Add the official Quartz repository as a remote called "upstream" (skip if already set)
git remote add upstream https://github.com/jackyzha0/quartz.git
# Fetch the v5 branch from the official repository
git fetch upstream v5
# Create a local v5 branch from the official one
git checkout -b v5 upstream/v5
# Install dependencies
npm i
# Push v5 to your GitHub repository
git push -u origin v5
```
## Setting Up Your Site
Once you're on v5, run the interactive setup to configure your site and import your content:
```bash
npx quartz create
```
This will prompt you for:
- A **template** (`default`, `obsidian`, `ttrpg`, `blog`) — pick the one closest to your old setup. `obsidian` is recommended if you use an Obsidian vault.
- A **content strategy** — choose "Copy" and point it to your backed-up content folder.
If you skipped the `create` wizard or need to restore your content manually:
```bash
# macOS / Linux
cp -r /tmp/quartz-content/* content/
# Windows (PowerShell)
Copy-Item -Recurse $env:TEMP\quartz-content\* content\
```
After running `create`, install all plugins referenced in the generated config:
```bash
npx quartz plugin install --from-config
```
## What Changed in v5
Quartz 5 introduces a community plugin system that fundamentally changes how plugins and components are managed. Most plugins that were built into Quartz 4 are now standalone community plugins maintained under the [quartz-community](https://github.com/quartz-community) organization.
Key changes:
- **Configuration format**: TypeScript (`quartz.config.ts`, `quartz.layout.ts`) → YAML (`quartz.config.yaml`)
- **Plugin system**: Plugins are now standalone Git repositories, installed via `npx quartz plugin add`
- **Import pattern**: Community plugins use `ExternalPlugin.X()` (from `.quartz/plugins`) instead of `Plugin.X()` (from `./quartz/plugins`)
- **Layout structure**: `quartz.layout.ts` is gone — layout position is now a per-plugin property in `quartz.config.yaml`, with `layout.groups` for flex containers (e.g. toolbar) and `layout.byPageType` for per-page-type overrides
- **Page Types**: A new plugin category for page rendering (content, folder, tag pages)
- **Component references**: In layout files, community components use `Plugin.X()` (from `.quartz/plugins`) instead of `Component.X()` (from `./quartz/components`)
- **Layout structure**: `quartz.layout.ts` is gone — layout position is now a per-plugin property in `quartz.config.yaml`
- **Page types**: A new plugin category for page rendering (content, folder, tag pages)
- **URL casing**: All generated URLs are now lowercased and hyphenated (e.g. `My Notes/Hello World.md` → `/my-notes/hello-world`). In v4, the original casing of file and folder names was preserved in URLs.
### Step-by-Step Migration
### URL Casing and SEO
#### 1. Set Up Quartz 5 with a Template
If your v4 site had URLs with uppercase letters, those URLs will return 404 errors after upgrading to v5. This also affects search engine indexing, since Google treats URLs as [case-sensitive](https://developers.google.com/search/docs/crawling-indexing/url-structure).
The easiest way to migrate is to use `npx quartz create`, which generates a complete `quartz.config.yaml` from a template with all default plugins pre-configured:
The [[AliasRedirects]] plugin (enabled by default) automatically handles this. During build, it detects files whose original path contained uppercase characters and generates redirect pages at the old URLs. These redirect pages include proper SEO signals (`<link rel="canonical">`, `<meta http-equiv="refresh">`, `<meta name="robots" content="noindex">`) so that search engines transfer ranking to the new lowercase URLs.
```shell
npx quartz create --template default --strategy copy --source /path/to/your/content
```
Available templates: `default`, `obsidian`, `ttrpg`, `blog`. Pick the one closest to your setup — `obsidian` is recommended if you use an Obsidian vault.
> [!tip] Choosing a template
> Each template comes with all 30+ default plugins pre-configured. The main differences are content strategy (OFM support, link resolution) and optional plugins (comments, maps). You can customize everything in `quartz.config.yaml` afterward.
After running `create`, install all the plugins referenced in the generated config:
```shell
npx quartz plugin resolve
```
This reads your `quartz.config.yaml` and installs every plugin listed in it. No need to run 30 individual `npx quartz plugin add` commands.
> [!note] Custom or optional plugins
> If you used optional plugins in v4 (comments, reader-mode, breadcrumbs, recent-notes, citations, etc.), add them after the initial setup:
>
> ```shell
> npx quartz plugin add github:quartz-community/comments
> npx quartz plugin add github:quartz-community/reader-mode
> npx quartz plugin add github:quartz-community/breadcrumbs
> npx quartz plugin add github:quartz-community/recent-notes
> ```
>
> See [[plugins/index|Plugins]] for the full list of available community plugins.
> [!info] Alternative: Use `npx quartz migrate`
> If you have an existing `quartz.config.ts` and `quartz.layout.ts` from v4, you can run `npx quartz migrate` instead. This reads your old config files and generates `quartz.config.yaml` with your existing settings. You'll still need to run `npx quartz plugin resolve` afterward to install the plugins. See [[cli/migrate|quartz migrate]] for details.
#### 2. Update quartz.config.yaml
**Before (v4):**
```ts title="quartz.config.ts"
import * as Plugin from "./quartz/plugins"
plugins: {
transformers: [
Plugin.FrontMatter(),
Plugin.CreatedModifiedDate({ priority: ["frontmatter", "git", "filesystem"] }),
Plugin.Latex({ renderEngine: "katex" }),
],
filters: [Plugin.RemoveDrafts()],
emitters: [
Plugin.AliasRedirects(),
Plugin.ComponentResources(),
Plugin.ContentPage(),
Plugin.FolderPage(),
Plugin.TagPage(),
Plugin.ContentIndex({ enableSiteMap: true, enableRSS: true }),
Plugin.Assets(),
Plugin.Static(),
Plugin.NotFoundPage(),
],
}
```
**After (v5):**
No manual configuration is needed — the plugin is enabled by default and the case redirect behavior is on by default. If you want to disable it, set `enableCaseRedirects: false` in the plugin options:
```yaml title="quartz.config.yaml"
plugins:
- source: github:quartz-community/note-properties
enabled: true
options:
delimiters: "---"
language: yaml
order: 5
- source: github:quartz-community/created-modified-date
enabled: true
options:
priority:
- frontmatter
- git
- filesystem
order: 10
- source: github:quartz-community/latex
enabled: true
options:
renderEngine: katex
order: 80
- source: github:quartz-community/remove-draft
enabled: true
- source: github:quartz-community/alias-redirects
enabled: true
- source: github:quartz-community/content-index
enabled: true
options:
enableSiteMap: true
enableRSS: true
- source: github:quartz-community/favicon
enabled: true
- source: github:quartz-community/og-image
enabled: true
- source: github:quartz-community/cname
enabled: true
- source: github:quartz-community/content-page
enabled: true
- source: github:quartz-community/folder-page
enabled: true
- source: github:quartz-community/tag-page
enabled: true
# ... more plugins
enableCaseRedirects: false
```
Key changes:
> [!tip] Hosting on Netlify?
> Netlify automatically lowercases all URLs and issues server-side 301 redirects. If you're hosting on Netlify, the case redirect pages aren't strictly necessary, but they don't hurt either.
- Plugins are now referenced by their GitHub source (`github:org/repo`)
- Plugin type (transformer, filter, emitter, pageType) is determined by the plugin's manifest, not by which array you place it in
- Execution order is controlled by the `order` field (lower numbers run first)
- Each plugin entry has `enabled`, `options`, `order`, and optionally `layout` fields
- Install community plugins with `npx quartz plugin add github:quartz-community/<name>`
#### 3. Update layout configuration
**Before (v4):**
```ts title="quartz.layout.ts"
import * as Component from "./quartz/components"
export const sharedPageComponents: SharedLayout = {
head: Component.Head(),
header: [],
afterBody: [],
footer: Component.Footer({ links: { ... } }),
}
export const defaultContentPageLayout: PageLayout = {
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta(), Component.TagList()],
left: [Component.PageTitle(), Component.Search(), Component.Darkmode(), Component.Explorer()],
right: [Component.Graph(), Component.TableOfContents(), Component.Backlinks()],
}
```
**After (v5):**
```yaml title="quartz.config.yaml"
plugins:
- source: github:quartz-community/breadcrumbs
enabled: true
layout:
position: beforeBody
priority: 5
- source: github:quartz-community/article-title
enabled: true
layout:
position: beforeBody
priority: 10
- source: github:quartz-community/content-meta
enabled: true
layout:
position: beforeBody
priority: 20
- source: github:quartz-community/tag-list
enabled: true
layout:
position: beforeBody
priority: 30
- source: github:quartz-community/page-title
enabled: true
layout:
position: left
priority: 10
- source: github:quartz-community/search
enabled: true
layout:
position: left
priority: 20
- source: github:quartz-community/darkmode
enabled: true
layout:
position: left
priority: 30
- source: github:quartz-community/explorer
enabled: true
layout:
position: left
priority: 50
- source: github:quartz-community/graph
enabled: true
layout:
position: right
priority: 10
- source: github:quartz-community/backlinks
enabled: true
layout:
position: right
priority: 30
- source: github:quartz-community/footer
enabled: true
options:
links:
GitHub: https://github.com/jackyzha0/quartz
Discord Community: https://discord.gg/cRFFHYye7t
layout:
byPageType:
content: {}
folder:
exclude:
- reader-mode
positions:
right: []
tag:
exclude:
- reader-mode
positions:
right: []
"404":
positions:
beforeBody: []
left: []
right: []
```
Key changes:
- Layout position is now a property on each plugin entry (`layout.position`, `layout.priority`)
- `sharedPageComponents` is gone — all layout is plugin-driven
- Per-page-type overrides live in the `layout.byPageType` section
- Empty arrays (`[]`) clear a position for that page type
- The `exclude` field removes specific plugins from a page type
#### 4. Update CI/CD
Add `npx quartz plugin restore` to your build pipeline, before `npx quartz build`. This installs plugins from the lockfile at their pinned versions.
If your CI uses `quartz.config.default.yaml` (or contributors may add plugins to config without updating the lockfile), also run `npx quartz plugin resolve` to install any config-referenced plugins that are missing from the lockfile:
```shell
npx quartz plugin restore # install pinned plugins from lockfile
npx quartz plugin resolve # install any config-referenced plugins not yet in lockfile
npx quartz build
```
See [[hosting]] for detailed CI/CD examples and [[ci-cd]] for advanced configuration.
#### 5. Commit and Deploy
```shell
git add quartz.config.yaml quartz.lock.json
git commit -m "chore: migrate to Quartz 5 plugin system"
```
> [!tip] Cleaning up leftover plugins
> After migrating, you may have plugins installed from v4 that are no longer in your v5 config. Run `npx quartz plugin prune` to remove them. Use `--dry-run` first to preview what would be removed.
> [!note] Most users don't need to worry about these details
> If you used the default Quartz 4 configuration (or only changed settings that `npx quartz create` prompts for), the setup wizard handles everything. The details below are for users who had custom plugin configurations.
### Plugin Reference Table
@@ -282,7 +117,7 @@ Mapping v4 plugin names to v5 equivalents:
| v4 | v5 | Type |
| ----------------------------------- | ------------------------------------------- | --------------------- |
| `Plugin.FrontMatter()` | `Plugin.FrontMatter()` (unchanged) | Internal |
| `Plugin.FrontMatter()` | `ExternalPlugin.NoteProperties()` | Community |
| `Plugin.CreatedModifiedDate()` | `ExternalPlugin.CreatedModifiedDate()` | Community |
| `Plugin.SyntaxHighlighting()` | `ExternalPlugin.SyntaxHighlighting()` | Community |
| `Plugin.ObsidianFlavoredMarkdown()` | `ExternalPlugin.ObsidianFlavoredMarkdown()` | Community |
@@ -303,57 +138,91 @@ Mapping v4 plugin names to v5 equivalents:
Component layout mapping:
| v4 Layout | v5 Layout |
| ----------------------------- | ------------------------------------------ |
| `Component.Explorer()` | `Plugin.Explorer()` |
| `Component.Graph()` | `Plugin.Graph()` |
| `Component.Search()` | `Plugin.Search()` |
| `Component.Backlinks()` | `Plugin.Backlinks()` |
| `Component.Darkmode()` | `Plugin.Darkmode()` |
| `Component.Footer()` | `Plugin.Footer()` |
| `Component.TableOfContents()` | `Plugin.TableOfContents()` |
| `Component.Head()` | `Component.Head()` (unchanged, internal) |
| `Component.Spacer()` | `Component.Spacer()` (unchanged, internal) |
| v4 Layout | v5 Layout |
| ----------------------------- | ---------------------------------------- |
| `Component.Explorer()` | `Plugin.Explorer()` |
| `Component.Graph()` | `Plugin.Graph()` |
| `Component.Search()` | `Plugin.Search()` |
| `Component.Backlinks()` | `Plugin.Backlinks()` |
| `Component.Darkmode()` | `Plugin.Darkmode()` |
| `Component.Footer()` | `Plugin.Footer()` |
| `Component.TableOfContents()` | `Plugin.TableOfContents()` |
| `Component.Head()` | `Component.Head()` (unchanged, internal) |
| `Component.Spacer()` | `Plugin.Spacer()` |
---
## Updating Your CI/CD
## Migrating from Quartz 3
Quartz 5 requires plugins to be installed before building. Add a plugin install step and (optionally) caching to your CI pipeline.
As you already have Quartz locally, you don't need to fork or clone it again. Simply just checkout the v4 branch, install the dependencies, restore plugins, and import your old vault. Then follow the [Quartz 4 migration steps above](#migrating-from-quartz-4) to get to v5.
Here's the recommended pattern, based on the project's own GitHub Actions:
```bash
git fetch
git checkout v4
git pull upstream v4
npm i
npx quartz plugin restore
npx quartz create
```yaml
- name: Cache dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Quartz plugins
uses: actions/cache@v5
with:
path: .quartz/plugins
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
restore-keys: |
${{ runner.os }}-plugins-
- run: npm ci
- name: Install Quartz plugins
run: npx quartz plugin install
- name: Build Quartz
run: npx quartz build
```
If you get an error like `fatal: 'upstream' does not appear to be a git repository`, make sure you add `upstream` as a remote origin:
The plugin cache uses `quartz.lock.json` as the cache key, so plugins are only re-downloaded when the lockfile changes.
For non-GitHub CI providers (Cloudflare, Vercel, Netlify), the build command should be:
```shell
git remote add upstream https://github.com/jackyzha0/quartz.git
npx quartz plugin install && npx quartz build
```
When running `npx quartz create`, you will be prompted as to how to initialize your content folder. Here, you can choose to import or link your previous content folder and Quartz should work just as you expect it to.
See [[hosting]] for provider-specific setup details.
> [!note]
> If the existing content folder you'd like to use is at the _same_ path on a different branch, clone the repo again somewhere at a _different_ path in order to use it.
## Setting Your Default Branch to v5
After verifying your site builds and deploys correctly, update your repository's default branch to `v5`:
1. Go to your repository on GitHub
2. Navigate to **Settings** → **General**
3. Under **Default branch**, click the switch icon next to your current default branch
4. Select `v5` from the dropdown and click **Update**
5. Confirm the change
This ensures that new clones, pull requests, and GitHub Pages deployments all target v5 by default. Your old v4 branch remains available for reference.
> [!warning] Update your CI triggers
> If your CI workflow triggers on a specific branch (e.g. `branches: [v4]`), make sure to update it to `v5`. See the [[hosting]] guide for examples.
## Notes for Quartz 3 Users
If you're coming from Quartz 3 (the Hugo-based version), follow the same steps above — get the v5 branch, run `npx quartz create`, and import your content. There is no need to go through Quartz 4 first.
### Key changes from Quartz 3
1. **Removing Hugo and `hugo-obsidian`**: Hugo worked well for earlier versions of Quartz but it also made it hard for people outside of the Golang and Hugo communities to fully understand what Quartz was doing under the hood and be able to properly customize it to their needs. Quartz now uses a Node-based static-site generation process which should lead to much more helpful error messages and an overall smoother user experience.
2. **Full-hot reload**: The many rough edges of how `hugo-obsidian` integrated with Hugo meant that watch mode didn't re-trigger `hugo-obsidian` to update the content index. This lead to a lot of weird cases where the watch mode output wasn't accurate. Quartz now uses a cohesive parse, filter, and emit pipeline which gets run on every change so hot-reloads are always accurate.
3. **Replacing Go template syntax with JSX**: Quartz 3 used [Go templates](https://pkg.go.dev/text/template) to create layouts for pages. However, the syntax isn't great for doing any sort of complex rendering (like [text processing](https://github.com/jackyzha0/quartz/blob/hugo/layouts/partials/textprocessing.html)) and it got very difficult to make any meaningful layout changes to Quartz 3. Quartz now uses an extension of JavaScript syntax called JSX which allows you to write layout code that looks like HTML in JavaScript which is significantly easier to understand and maintain.
4. **A new extensible [[configuration]] and [[configuration#Plugins|plugin]] system**: Quartz 3 was hard to configure without technical knowledge of how Hugo's partials worked. Extensions were even hard to make. Quartz 5's configuration and plugin system is designed to be extended by users while making updating to new versions of Quartz easy.
1. **Hugo is gone**: Quartz now uses a Node-based static-site generation process. No more Go templates or `hugo-obsidian`.
2. **Full hot-reload**: The development server (`npx quartz build --serve`) re-processes all content on every change.
3. **JSX instead of Go templates**: Layout components are written in JSX (JavaScript XML), which is significantly easier to customize.
4. **New plugin system**: See [[configuration#Plugins|Plugins]] for details on the extensible plugin architecture.
### Things to update
- You will need to update your deploy scripts. See the [[hosting]] guide for more details.
- Ensure that your default branch on GitHub is updated from `hugo` to `v5`.
- [[folder and tag listings|Folder and tag listings]] have also changed.
- Folder descriptions should go under `content/<folder-name>/index.md` where `<folder-name>` is the name of the folder.
- Tag descriptions should go under `content/tags/<tag-name>.md` where `<tag-name>` is the name of the tag.
- Some HTML layout may not be the same between Quartz 3 and Quartz 5. If you depended on a particular HTML hierarchy or class names, you may need to update your custom CSS to reflect these changes.
- If you customized the layout of Quartz 3, you may need to translate these changes from Go templates back to JSX as Quartz 5 no longer uses Hugo. For components, check out the guide on [[creating components]] for more details on this.
- Update your deploy scripts — see the [[hosting]] guide.
- Ensure your default branch on GitHub is updated to `v5`.
- [[folder and tag listings|Folder and tag listings]] have changed:
- Folder descriptions go under `content/<folder-name>/index.md`
- Tag descriptions go under `content/tags/<tag-name>.md`
- Custom CSS may need updates if you depended on specific HTML hierarchy or class names from Quartz 3.
+85 -4
View File
@@ -5,7 +5,7 @@ aliases:
---
> [!note]
> This is specifically a guide for upgrading your Quartz to a more recent update. If you are coming from Quartz 4 or Quartz 3, check out the [[getting-started/migrating|migration guide]] for more info.
> This is specifically a guide for upgrading your Quartz to a more recent update. If you are coming from Quartz 4 or Quartz 3, check out the [[migrating|migration guide]] for more info.
To fetch the latest Quartz updates, simply run
@@ -13,7 +13,7 @@ To fetch the latest Quartz updates, simply run
npx quartz upgrade
```
As Quartz uses [git](https://git-scm.com/) under the hood for versioning, upgrading effectively 'pulls' in the updates from the official Quartz GitHub repository. If you have local changes that might conflict with the updates, you may need to resolve these manually yourself (or, pull manually using `git pull origin upstream`).
As Quartz uses [git](https://git-scm.com/) under the hood for versioning, upgrading effectively 'pulls' in the updates from the official Quartz GitHub repository. Merge conflicts in `quartz.lock.json` are handled automatically — Quartz backs up your lockfile before pulling and restores it afterward. For other files with local changes that conflict with the updates, you may need to resolve these manually yourself (or, pull manually using `git pull origin upstream`).
> [!hint]
> Quartz will try to cache your content before upgrading to try and prevent merge conflicts. If you get a conflict mid-merge, you can stop the merge and then run `npx quartz restore` to restore your content from the cache.
@@ -23,10 +23,46 @@ If you have the [GitHub desktop app](https://desktop.github.com/), this will aut
To update your installed plugins separately, use:
```bash
npx quartz update
npx quartz plugin install --latest
```
See the [[cli/update|CLI reference for update]] and [[cli/upgrade|CLI reference for upgrade]] for more details on available flags.
See the [[upgrade|CLI reference for upgrade]] for more details on available flags.
### Layout System Changes
The `footer` layout slot is now an array of components, consistent with other layout slots like `header`, `left`, and `right`. Additionally, `header` and `footer` are now configurable layout positions — plugins can declare `layout: { position: header }` or `layout: { position: footer }` in their YAML config.
**If you override layouts in `quartz.ts`**, update any `footer` assignments to use arrays:
```ts title="quartz.ts"
// Before
export const layout = await loadQuartzLayout({
defaults: { footer: MyFooterComponent },
})
// After
export const layout = await loadQuartzLayout({
defaults: { footer: [MyFooterComponent] },
})
```
**If you have a custom page frame**, update the `render` function to iterate the footer array:
```tsx
// Before
render({ footer: Footer, ...rest }: PageFrameProps) {
return <Footer {...componentData} />
}
// After
render({ footer, ...rest }: PageFrameProps) {
return footer.map((F) => <F {...componentData} />)
}
```
Both changes are caught by TypeScript at compile time — running `npx quartz build` will show the error.
No changes are needed for `quartz.config.yaml` — the YAML format is unchanged.
### Cleaning Up Unused Plugins
@@ -38,3 +74,48 @@ npx quartz plugin prune # remove orphaned plugins
```
See the [[cli/plugin#prune|plugin prune reference]] for more details.
## Switching to npm Plugin Specifiers
First-party Quartz plugins are now published to npm under the `@quartz-community` scope. If your `quartz.config.yaml` uses `github:` specifiers, you can optionally switch to npm specifiers for faster installs and better version pinning.
### Why Switch?
- **Faster installs**: npm packages are cached locally and don't require git cloning
- **Version pinning**: npm uses semver ranges, so you control when to update
- **No build step**: npm packages ship pre-built, unlike git sources which may need to build on install
### How to Migrate
Update each plugin source in your `quartz.config.yaml` from the `github:` format to the quoted npm format:
```yaml
# Before
plugins:
- source: github:quartz-community/syntax-highlighting
enabled: true
# After
plugins:
- source: "@quartz-community/syntax-highlighting"
enabled: true
```
> [!important]
> The `@` scoped name must be quoted in YAML. Use double quotes around the source value.
Then install the packages:
```bash
npm install @quartz-community/syntax-highlighting
```
Or install all default plugins at once:
```bash
npm install @quartz-community/created-modified-date @quartz-community/syntax-highlighting @quartz-community/obsidian-flavored-markdown @quartz-community/github-flavored-markdown @quartz-community/table-of-contents @quartz-community/crawl-links @quartz-community/description @quartz-community/latex @quartz-community/quartz-fonts @quartz-community/remove-draft @quartz-community/alias-redirects @quartz-community/content-index @quartz-community/favicon @quartz-community/og-image @quartz-community/cname @quartz-community/canvas-page @quartz-community/content-page @quartz-community/folder-page @quartz-community/tag-page @quartz-community/explorer @quartz-community/graph @quartz-community/search @quartz-community/backlinks @quartz-community/article-title @quartz-community/content-meta @quartz-community/page-title @quartz-community/darkmode @quartz-community/reader-mode @quartz-community/breadcrumbs @quartz-community/footer @quartz-community/spacer @quartz-community/bases-page @quartz-community/note-properties @quartz-community/unlisted-pages @quartz-community/encrypted-pages
```
### Do I Have to Switch?
No. The `github:` specifiers continue to work and will be supported indefinitely. They are still the recommended approach for third-party and community plugins that are not published to npm. The npm path is an optional improvement for first-party plugins.
+193
View File
@@ -0,0 +1,193 @@
---
title: "What's New in Quartz 5"
aliases:
- "changelog"
- "v5"
---
Quartz 5 is a ground-up rearchitecture of Quartz focused on extensibility, performance, and Obsidian compatibility. If you're coming from v4, see [[migrating|Migrating to Quartz 5]] for the upgrade path.
## Plugin Ecosystem
The biggest change in v5 is the move to a **community plugin ecosystem**. Plugins are now standalone packages maintained in the [quartz-community](https://github.com/quartz-community) GitHub organization and installed via git:
```bash
npx quartz plugin add github:quartz-community/explorer
```
This means:
- **Independent versioning**: Plugins can be updated without upgrading Quartz itself
- **Community contributions**: Anyone can publish a Quartz plugin
- **Smaller core**: Quartz core is leaner; features live in plugins
- **Plugin registry**: Discover plugins via `npx quartz tui` or the [plugin registry](https://github.com/quartz-community/registry)
Over 40 official plugins ship with Quartz, covering everything from search and graph view to encrypted pages and canvas rendering.
## YAML Configuration
Configuration moved from TypeScript (`quartz.config.ts`) to **YAML** (`quartz.config.yaml`):
```yaml title="quartz.config.yaml"
configuration:
pageTitle: My Digital Garden
enableSPA: true
enablePopovers: true
locale: en-US
baseUrl: mysite.github.io
theme:
typography:
header: Schibsted Grotesk
body: Source Sans Pro
code: IBM Plex Mono
plugins:
- source: github:quartz-community/obsidian-flavored-markdown
enabled: true
order: 30
- source: github:quartz-community/explorer
enabled: true
layout:
position: left
priority: 50
```
Benefits:
- **No TypeScript knowledge required** for basic customization
- **JSON Schema validation** — editors with YAML support show errors inline
- **Layout defined per-plugin** — each plugin declares its own position and priority
- **Templates** — `npx quartz create` offers preconfigured templates (default, obsidian, ttrpg, blog)
For advanced options that need JavaScript (callbacks, custom components), the `quartz.ts` override system provides full programmatic control.
## Improved Obsidian Compatibility
Quartz 5 aims for full compatibility with Obsidian's core features:
- **Wikilinks** — all variations including aliases, headings, block references, and pipe escaping in tables
- **Callouts** — all built-in types, collapsible variants, and nested callouts
- **Highlights** — `==highlighted text==` syntax
- **Comments** — `%%hidden comments%%` (inline and block)
- **Tags** — `#tag` and `#nested/tag` with tag pages
- **Custom task characters** — `[?]`, `[!]`, `[>]`, etc. preserved as `data-task` attributes
- **Mermaid diagrams** — rendered with expand button
- **YouTube and Tweet embeds** — via image syntax
- **Block references** — `^block-id` with broad character support
- **Video/audio embeds** — full format support (mp4, webm, ogv, mov, mkv, avi, flac, aac, etc.)
- **Canvas files** — rendered as interactive, pannable pages via the canvas-page plugin
- **Obsidian URI links** — marked with CSS class for custom styling
- **Footnotes** — via the GitHub Flavored Markdown plugin
See [[Obsidian compatibility]] for the full list.
## Page Type System
Quartz 5 introduces **page types** — plugins that define how different kinds of pages are rendered:
- **Content pages** — regular markdown notes
- **Folder pages** — directory listing pages
- **Tag pages** — pages listing notes with a given tag
- **Canvas pages** — interactive JSON Canvas renderings
- **Bases pages** — database-style views of your content
Each page type can use a different [[layout#Page Frames|page frame]] for fundamentally different HTML structures (three-column, full-width, minimal, etc.).
## Layout System
The layout system is now declarative. Plugins declare their position (`left`, `right`, `beforeBody`, `afterBody`) and priority in the config:
```yaml
plugins:
- source: github:quartz-community/explorer
layout:
position: left
priority: 50
- source: github:quartz-community/graph
layout:
position: right
priority: 10
```
Additional features:
- **Groups** — combine components into flex rows/columns (e.g., toolbar with search + darkmode toggle)
- **Conditional rendering** — show/hide components based on page properties (`condition: not-index`, `condition: has-tags`)
- **Display modifiers** — `display: mobile-only` or `display: desktop-only`
- **Per-page-type overrides** — different layouts for content, folder, tag, and 404 pages
## Performance
- **Parallel processing** — markdown parsing uses a worker pool across all CPU cores
- **Incremental rebuilds** — watch mode only re-processes changed files
- **Pre-built plugins** — community plugins ship compiled `dist/` directories, skipping build-from-source on install
- **SPA routing** — client-side navigation with `micromorph` for instant page transitions
- **CDN-cached fonts** — Google Fonts with aggressive caching, or fully self-hosted with `fontOrigin: local`
## CLI Improvements
The CLI is simpler and more helpful:
| Command | Description |
| -------------------------------- | --------------------------------------- |
| `npx quartz create` | Interactive setup wizard with templates |
| `npx quartz build --serve` | Build and serve with hot reload |
| `npx quartz sync` | Commit and push to GitHub |
| `npx quartz upgrade` | Pull latest Quartz updates |
| `npx quartz plugin install` | Install plugins from lockfile |
| `npx quartz plugin add <source>` | Add a new plugin |
| `npx quartz plugin list` | List installed plugins |
| `npx quartz plugin prune` | Remove unused plugins |
Other improvements:
- **Node.js version check** — clear error message if running on Node < 22
- **Port conflict handling** — helpful message when port is already in use
- **Plugin lockfile** — `quartz.lock.json` pins plugin versions for reproducible builds
- **Concurrency control** — `--concurrency` flag for memory-constrained environments
## Internationalization
Quartz 5 supports multiple locales out of the box. Set `locale: ja-JP` (or any supported locale) in your config to translate all UI strings — search placeholders, "table of contents", date formatting, and more.
## New Plugins
Plugins new to v5 (not available in v4):
```base
filters:
and:
- file.ext == "md"
- file.inFolder("plugins")
- note["new-in-v5"] == true
properties:
title:
displayName: Plugin
repository:
displayName: Repository
description:
displayName: Description
views:
- type: table
name: New in v5
order:
- title
- repository
- description
sort:
- property: title
direction: ASC
```
## For Plugin Developers
If you built plugins for v4, the development model has changed significantly:
- Plugins are **standalone npm packages** with their own `package.json`, `tsconfig.json`, and build system
- The **factory function pattern** (inspired by Astro integrations) replaces class-based plugins
- **`@quartz-community/types`** provides full type safety without depending on the Quartz core
- **`@quartz-community/utils`** provides shared path, DOM, and language utilities
- **`@quartz-community/runtime`** provides browser runtime utilities
- Plugins can ship **components**, **frames**, **stylesheets**, and **client scripts**
- A **plugin template** is available at [quartz-community/plugin-template](https://github.com/quartz-community/plugin-template)
See [[making plugins]] for the full guide.
+76 -22
View File
@@ -7,13 +7,13 @@ Quartz effectively turns your Markdown files and other resources into a bundle o
However, if you'd like to publish your site to the world, you need a way to host it online. This guide will detail how to deploy with common hosting providers but any service that allows you to deploy static HTML should work as well.
> [!warning]
> The rest of this guide assumes that you've already created your own GitHub repository for Quartz. If you haven't already, [[setting up your GitHub repository|make sure you do so]].
> The rest of this guide assumes that you've already created your own GitHub repository for Quartz. If you haven't already, follow the [[installation#Setting Up Your GitHub Repository|GitHub repository setup]] section of the installation guide.
> [!hint]
> Some Quartz features (like [[RSS Feed]] and sitemap generation) require `baseUrl` to be configured properly in your [[configuration]] to work properly. Make sure you set this before deploying!
> [!tip] Keeping plugins in sync
> All hosting examples below use `npx quartz plugin restore` to install plugins from the lockfile. If contributors may add plugins to `quartz.config.yaml` without updating the lockfile, add `npx quartz plugin resolve` after `restore` in your build command to install any missing plugins. See [[cli/plugin#resolve|plugin resolve]] for details.
> All hosting examples below use `npx quartz plugin install` to install plugins from the lockfile. If contributors may add plugins to `quartz.config.yaml` without updating the lockfile, add `npx quartz plugin install --from-config` after `install` in your build command to install any missing plugins. See [[cli/plugin#install|plugin install]] for details.
## Cloudflare Pages
@@ -25,7 +25,7 @@ However, if you'd like to publish your site to the world, you need a way to host
| ---------------------- | ----------------------------------------------- |
| Production branch | `v5` |
| Framework preset | `None` |
| Build command | `npx quartz plugin restore && npx quartz build` |
| Build command | `npx quartz plugin install && npx quartz build` |
| Build output directory | `public` |
Press "Save and deploy" and Cloudflare should have a deployed version of your site in about a minute. Then, every time you sync your Quartz changes to GitHub, your site should be updated.
@@ -33,10 +33,10 @@ Press "Save and deploy" and Cloudflare should have a deployed version of your si
To add a custom domain, check out [Cloudflare's documentation](https://developers.cloudflare.com/pages/platform/custom-domains/).
> [!warning]
> Cloudflare Pages performs a shallow clone by default, so if you rely on `git` for timestamps, it is recommended that you add `git fetch --unshallow &&` to the beginning of the build command (e.g., `git fetch --unshallow && npx quartz plugin restore && npx quartz build`).
> Cloudflare Pages performs a shallow clone by default, so if you rely on `git` for timestamps, it is recommended that you add `git fetch --unshallow &&` to the beginning of the build command (e.g., `git fetch --unshallow && npx quartz plugin install && npx quartz build`).
> [!note]
> For more detailed CI/CD configuration including caching and plugin management, see [[ci-cd]].
> For more detailed CI/CD configuration including caching and plugin management, see [[migrating#Updating Your CI/CD|the migration guide]].
## GitHub Pages
@@ -61,18 +61,32 @@ concurrency:
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for git info
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
- name: Cache dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Quartz plugins
uses: actions/cache@v5
with:
path: .quartz/plugins
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
restore-keys: |
${{ runner.os }}-plugins-
- name: Install Dependencies
run: npm ci
- name: Restore Quartz plugins
run: npx quartz plugin restore
- name: Install Quartz plugins
run: npx quartz plugin install
- name: Build Quartz
run: npx quartz build
- name: Upload artifact
@@ -120,7 +134,11 @@ Here's how to add a custom domain to your GitHub pages deployment.
- `185.199.111.153`
- If you are using a subdomain, navigate to your DNS provider and create a `CNAME` record that points your subdomain to the default domain for your site. For example, if you want to use the subdomain `quartz.example.com` for your user site, create a `CNAME` record that points `quartz.example.com` to `<github-username>.github.io`.
![[dns records.png]]_The above shows a screenshot of Google Domains configured for both `jzhao.xyz` (an apex domain) and `quartz.jzhao.xyz` (a subdomain)._
![[dns records.png]]_The above shows a screenshot of Google Domains configured for both `jzhao.xyz`
(an apex domain) and `quartz.jzhao.xyz`
(a subdomain)._
See the [GitHub documentation](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain) for more detail about how to setup your own custom domain with GitHub Pages.
@@ -152,7 +170,7 @@ Before deploying to Vercel, a `vercel.json` file is required at the root of the
| ----------------------------------------- | ----------------------------------------------- |
| Framework Preset | `Other` |
| Root Directory | `./` |
| Build and Output Settings > Build Command | `npx quartz plugin restore && npx quartz build` |
| Build and Output Settings > Build Command | `npx quartz plugin install && npx quartz build` |
5. Press Deploy. Once it's live, you'll have 2 `*.vercel.app` URLs to view the page.
@@ -183,7 +201,7 @@ Using `docs.example.com` is an example of a subdomain. They're a simple way of c
1. Log in to the [Netlify dashboard](https://app.netlify.com/) and click "Add new site".
2. Select your Git provider and repository containing your Quartz project.
3. Under "Build command", enter `npx quartz plugin restore && npx quartz build`.
3. Under "Build command", enter `npx quartz plugin install && npx quartz build`.
4. Under "Publish directory", enter `public`.
5. Press Deploy. Once it's live, you'll have a `*.netlify.app` URL to view the page.
6. To add a custom domain, check "Domain management" in the left sidebar, just like with Vercel.
@@ -197,11 +215,14 @@ stages:
- build
- deploy
image: node:22
cache: # Cache modules in between jobs
key: $CI_COMMIT_REF_SLUG
paths:
- .npm/
image: node:24
cache:
- key: npm-$CI_COMMIT_REF_SLUG
paths:
- .npm/
- key: plugins-$CI_COMMIT_REF_SLUG
paths:
- .quartz/plugins/
build:
stage: build
@@ -211,13 +232,11 @@ build:
- hash -r
- npm ci --cache .npm --prefer-offline
script:
- npx quartz plugin restore
- npx quartz plugin install
- npx quartz build
artifacts:
paths:
- public
tags:
- gitlab-org-docker
pages:
stage: deploy
@@ -295,3 +314,38 @@ example.com {
}
}
```
## Caching
Quartz emits CSS and JS files with content hashes in their filenames (e.g. `index-a3f2c1b.css`, `component-7d4e2f.css`). Since the filename changes whenever the content changes, these files can be cached indefinitely. HTML files should not be cached long-term since they reference the hashed filenames and need to stay fresh.
### Cloudflare Pages / Vercel / Netlify
These platforms handle caching automatically. No configuration is needed — hashed assets will be served with appropriate cache headers out of the box.
### Nginx
```nginx title="nginx.conf"
# Immutable cache for hashed assets
location ~* \.(css|js)$ {
if ($uri ~* "-[0-9a-f]{8}\.") {
add_header Cache-Control "public, max-age=31536000, immutable";
}
}
```
### Caddy
```caddy title="Caddyfile"
@hashed path_regexp hashed -[0-9a-f]{8}\.(css|js)$
header @hashed Cache-Control "public, max-age=31536000, immutable"
```
### Apache
```apache title=".htaccess"
# Immutable cache for content-hashed assets
<FilesMatch "-[0-9a-f]{8}\.(css|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
```
+37 -12
View File
@@ -6,30 +6,55 @@ Quartz is a fast, batteries-included static-site generator that transforms Markd
## 🪴 Get Started
Quartz requires **at least [Node](https://nodejs.org/) v22** and `npm` v10.9.2 to function correctly. Ensure you have this installed on your machine before continuing.
Quartz requires **at least [Node](https://nodejs.org/) v22** and `npm` v10.9.2 to function correctly. Ensure you have these installed on your machine before continuing. See the [[getting-started/index#Prerequisites|prerequisites]] for help installing them.
Then, in your terminal of choice, enter the following commands line by line:
> [!tip] GitHub users
> You can also use the **[GitHub template](https://github.com/jackyzha0/quartz/generate)** to create your repository in one click, then clone that instead. See [[installation#Option A Use the GitHub Template Recommended|Option A]] in the installation guide.
```shell
git clone -b v5 https://github.com/jackyzha0/quartz.git
# 1. Clone the Quartz repository
git clone https://github.com/jackyzha0/quartz.git
cd quartz
# 2. Install dependencies
npm i
npx quartz plugin restore
# 3. Initialize your site (choose a template, set your base URL, import content)
npx quartz create
# 4. Install plugins referenced by your chosen template
npx quartz plugin install --from-config
# 5. Preview your site locally
npx quartz build --serve
```
This will guide you through initializing your Quartz with content, including choosing a [[cli/create#templates|project template]] and configuring your site's base URL. Once you've done so, see how to:
Your site is now running at `http://localhost:8080`. From here:
1. [[authoring content|Writing content]] in Quartz
2. [[configuration|Configure]] Quartz's behaviour
3. Change Quartz's [[layout]]
4. [[build|Build and preview]] Quartz
5. Sync your changes with [[setting up your GitHub repository|GitHub]]
6. [[hosting|Host]] Quartz online
- **[[authoring-content|Write content]]** in the `content/` folder
- **[[installation|Push to GitHub]]** with `npx quartz sync`
- **[[hosting|Deploy]]** to GitHub Pages, Cloudflare, Netlify, or Vercel
For the full walkthrough, see the [[getting-started/index|Getting Started]] guide.
### Returning User?
Already have a Quartz repository and cloning it on a new machine?
```shell
git clone https://github.com/<your-username>/<your-repo>.git
cd <your-repo>
npm ci
npx quartz plugin install
npx quartz build --serve
```
> [!tip]
> If you hit build errors on a fresh clone, try `npx quartz plugin install --latest` to refresh plugins to their latest versions. See [[troubleshooting#Plugins fail to build on a fresh clone]] for details.
## 🔧 Features
- [[Obsidian compatibility]], [[full-text search]], [[graph view]], [[wikilinks|wikilinks, transclusions]], [[backlinks]], [[features/Latex|Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], [[i18n|internationalization]], [[comments]] and [many more](./features/) right out of the box
- [[Obsidian compatibility]], [[full-text search]], [[graph view]], [[wikilinks|wikilinks, transclusions]], [[plugins/Backlinks]], [[features/Latex|Latex]], [[syntax highlighting]], [[popover previews]], [[Docker Support]], [[i18n|internationalization]], [[features/comments|comments]] and [many more](./features/) right out of the box
- Hot-reload on configuration edits and incremental rebuilds for content edits
- Simple JSX layouts and [[creating components|page components]]
- [[SPA Routing|Ridiculously fast page loads]] and tiny bundle sizes
+34 -3
View File
@@ -20,7 +20,7 @@ export interface FullPageLayout {
afterBody: QuartzComponent[] // laid out vertically
left: QuartzComponent[] // vertical on desktop and tablet, horizontal on mobile
right: QuartzComponent[] // vertical on desktop, horizontal on tablet and mobile
footer: QuartzComponent // single component
footer: QuartzComponent[] // laid out vertically
}
```
@@ -36,7 +36,7 @@ These correspond to following parts of the page:
> There are two additional layout fields that are _not_ shown in the above diagram.
>
> 1. `head` is a single component that renders the `<head>` [tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) in the HTML. This doesn't appear visually on the page and is only is responsible for metadata about the document like the tab title, scripts, and styles.
> 2. `header` is a set of components that are laid out horizontally and appears _before_ the `beforeBody` section. This enables you to replicate the old Quartz 3 header bar where the title, search bar, and dark mode toggle. By default, Quartz doesn't place any components in the `header`.
> 2. `header` is a set of components that are laid out horizontally and appears _before_ the `beforeBody` section. You can place components in the header by setting `layout.position: header` in your plugin configuration. This enables layouts similar to Quartz 3's header bar with title, search bar, and dark mode toggle.
Layout components are configured in the `layout` section of `quartz.config.yaml`. Plugins declare their position and priority, and the layout system arranges them automatically:
@@ -77,12 +77,20 @@ plugins:
layout:
position: beforeBody
priority: 30
- source: github:quartz-community/darkmode
enabled: true
layout:
position: header
priority: 10
- source: github:quartz-community/footer
enabled: true
options:
links:
GitHub: https://github.com/jackyzha0/quartz
Discord Community: https://discord.gg/cRFFHYye7t
layout:
position: footer
priority: 50
layout:
groups:
@@ -108,6 +116,29 @@ layout:
right: []
```
### Conditional Rendering
Plugins can specify a `condition` in their layout block to control when they appear. This uses built-in presets:
```yaml title="quartz.config.yaml"
plugins:
- source: github:quartz-community/breadcrumbs
enabled: true
layout:
position: beforeBody
priority: 5
condition: not-index
```
Available conditions:
| Condition | Effect |
| ----------- | ---------------------------------------------------- |
| `not-index` | Hidden on the root index page, shown everywhere else |
| `has-tags` | Only shown on pages that have tags in frontmatter |
See [[layout-components]] for more details on conditional rendering and display options.
For advanced layout overrides using TypeScript (e.g. custom component wrappers or conditional logic), you can use the TS override in `quartz.ts`:
```ts title="quartz.ts"
@@ -178,7 +209,7 @@ Plugins can ship their own frames by declaring them in `package.json` and export
**2. Core frames (for project-specific frames):**
You can also create frames directly in `quartz/components/frames/` by implementing the `PageFrame` interface and registering the frame in `quartz/components/frames/index.ts`. See the [[advanced/architecture|architecture overview]] for the full `PageFrame` interface.
You can also create frames directly in `quartz/components/frames/` by implementing the `PageFrame` interface and registering the frame in `quartz/components/frames/index.ts`. See the [[architecture|architecture overview]] for the full `PageFrame` interface.
Frames are applied as a `data-frame` attribute on the `.page` element, which you can target in CSS:
+38 -8
View File
@@ -1,34 +1,64 @@
---
title: AliasRedirects
description: Generates redirect pages from frontmatter aliases and case-preserving URLs.
tags:
- plugin/emitter
image: https://images.unsplash.com/photo-1601735479770-bb5de9dbe844
repository: "[quartz-community/alias-redirects](https://github.com/quartz-community/alias-redirects)"
enabled: true
required: false
---
This plugin emits HTML redirect pages for aliases and permalinks defined in the frontmatter of content files.
This plugin emits HTML redirect pages so that old URLs redirect to the canonical page. It handles two types of redirects:
For example, A `foo.md` has the following frontmatter
1. **Frontmatter aliases**: Redirect pages for aliases defined in your content's frontmatter.
2. **Case-preserving redirects**: Automatic redirect pages for URLs that changed due to Quartz v5's lowercase slug normalization.
### Frontmatter Aliases
If `foo.md` has the following frontmatter:
```md title="foo.md"
---
title: "Foo"
alias:
aliases:
- "bar"
---
```
The target `host.me/bar` will be redirected to `host.me/foo`
The target `host.me/bar` will be permanently redirected to `host.me/foo`.
Note that these are permanent redirect.
The emitter supports the following aliases:
The emitter supports the following frontmatter fields:
- `aliases`
- `alias`
### Case-Preserving Redirects
Quartz v5 normalizes all URLs to lowercase. If you are migrating from v4 (which preserved the original casing), previously indexed URLs containing uppercase letters (e.g. `/Diary/My-Note`) would return 404 errors.
When `enableCaseRedirects` is enabled (the default), this plugin automatically detects files whose original path differs from the lowercased slug and generates redirect pages at the original-case URL. For example, if your content directory contains `Diary/2026-01-01.md`, the plugin generates:
- The canonical page at `/diary/2026-01-01` (produced by the normal build)
- A redirect page at `/Diary/2026-01-01` (produced by this plugin)
The redirect page includes proper SEO signals:
- `<meta http-equiv="refresh" content="0; url=...">` for an instant redirect
- `<link rel="canonical">` pointing to the lowercase URL
- `<meta name="robots" content="noindex">` to prevent duplicate indexing
This preserves search engine rankings and ensures inbound links continue to work.
> [!note]
> Case-preserving redirects have no effect on case-insensitive filesystems (macOS, Windows) where the server already resolves either casing to the same file. The plugin automatically detects the filesystem type and skips redirect generation when unnecessary.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
This plugin has no configuration options.
This plugin accepts the following configuration options:
- `enableCaseRedirects`: If `true` (default), automatically generates redirect pages for URLs that changed casing due to v5's lowercase normalization. Set to `false` to disable this behavior.
## API
+5
View File
@@ -1,7 +1,12 @@
---
title: ArticleTitle
description: Renders the article title as an h1 heading.
tags:
- plugin/component
image:
repository: "[quartz-community/article-title](https://github.com/quartz-community/article-title)"
enabled: true
required: false
---
This plugin renders the article title from the page's frontmatter as an `<h1>` heading at the top of the page content. It reads the `title` field from frontmatter (falling back to the filename if no title is set).
+1
View File
@@ -2,6 +2,7 @@
title: Assets
tags:
- plugin/emitter
image: https://images.unsplash.com/photo-1526304640581-d334cdbbf45e
---
This plugin emits all non-Markdown static assets in your content folder (like images, videos, HTML, etc). The plugin respects the `ignorePatterns` in the global [[configuration]].
+6 -1
View File
@@ -1,7 +1,12 @@
---
title: Backlinks
description: Shows pages that link to the current page.
tags:
- plugin/component
image:
repository: "[quartz-community/backlinks](https://github.com/quartz-community/backlinks)"
enabled: true
required: false
---
Shows pages that link to the current page.
@@ -9,7 +14,7 @@ Shows pages that link to the current page.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
See [[backlinks]] for detailed usage information.
See [[plugins/Backlinks]] for detailed usage information.
## Configuration
+15
View File
@@ -1,8 +1,14 @@
---
title: BasesPage
description: Renders Obsidian Bases files as database-style views.
tags:
- plugin/pageType
- plugin/component
image:
new-in-v5: true
repository: "[quartz-community/bases-page](https://github.com/quartz-community/bases-page)"
enabled: true
required: false
---
This plugin provides support for [Obsidian Bases](https://obsidian.md/changelog/2025-04-15-desktop-v1.8.0/) (`.base` files) in Quartz. It reads `.base` files from your vault, resolves matching notes based on the query definition, and renders them as interactive database-like views with support for tables, lists, cards, and maps. It uses the `default` [[layout#Page Frames|page frame]] (three-column layout with sidebars).
@@ -23,11 +29,19 @@ This plugin provides support for [Obsidian Bases](https://obsidian.md/changelog/
- **Property configuration**: Custom display names for properties.
- **Link rendering**: Wikilinks and Markdown links within cell values are rendered as clickable links.
## Interaction with `unlisted` pages
`BasesPage` respects the `file.data.unlisted` convention written by [[UnlistedPages]] and [[EncryptedPages]]. Pages marked `unlisted: true` (or encrypted pages with `stealth: true`) are excluded from every rendered base view — table, list, board, cards, gallery, and any custom view — regardless of whether the base's filter expression would match them. Unlisted pages also cannot be dereferenced from formulas on visible pages via `.asFile()`.
> [!note]
> Base views are **server-side rendered** HTML baked at build time. They do not update client-side after a visitor decrypts an encrypted page. Graph, explorer, and search all re-hydrate from the patched in-memory content index and show newly-unlocked pages for the rest of the browser session — base views do not, because they were materialized at build time with unlisted pages already excluded. A visitor who successfully decrypts a revealable encrypted page will see it appear in graph, explorer, and search, but **not** in any base view, until the site is rebuilt with that page listed. This is the same structural limitation that applies to backlinks, recent notes, folder listings, and tag listings.
## Configuration
This plugin accepts the following configuration options:
- `defaultViewType`: The default view type when none is specified in the `.base` file. Defaults to `"table"`.
- `linkResolution`: How to resolve internal links in view renderers. Should match the `markdownLinkResolution` setting of the [[CrawlLinks]] plugin. Can be `"absolute"`, `"relative"`, or `"shortest"`. Defaults to `"shortest"`.
- `customViews`: A map of custom view renderers. Keys are view type names. These override built-in renderers for the same type, or add new view types. Requires a TS override.
### Default options
@@ -42,6 +56,7 @@ For custom view renderers, use a TS override in `quartz.ts`:
```ts title="quartz.ts (override)"
import * as ExternalPlugin from "./.quartz/plugins"
// Must be placed before loadQuartzConfig()
ExternalPlugin.BasesPage({
defaultViewType: "table",
customViews: {
+6 -1
View File
@@ -1,7 +1,12 @@
---
title: Breadcrumbs
description: Breadcrumb navigation trail.
tags:
- plugin/component
image:
repository: "[quartz-community/breadcrumbs](https://github.com/quartz-community/breadcrumbs)"
enabled: true
required: false
---
Navigation breadcrumb trail.
@@ -9,7 +14,7 @@ Navigation breadcrumb trail.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
See [[breadcrumbs]] for detailed usage information.
See [[plugins/Breadcrumbs]] for detailed usage information.
## Configuration
+5
View File
@@ -1,7 +1,12 @@
---
title: CNAME
description: Emits a CNAME file for custom domain deployment.
tags:
- plugin/emitter
image:
repository: "[quartz-community/cname](https://github.com/quartz-community/cname)"
enabled: true
required: false
---
This plugin emits a `CNAME` record that points your subdomain to the default domain of your site.
+6
View File
@@ -1,7 +1,13 @@
---
title: CanvasPage
description: Renders JSON Canvas files as interactive, pannable pages.
tags:
- plugin/pageType
image: "#7852ee"
new-in-v5: true
repository: "[quartz-community/canvas-page](https://github.com/quartz-community/canvas-page)"
enabled: true
required: false
---
This plugin is a page type plugin that renders [JSON Canvas](https://jsoncanvas.org) (`.canvas`) files as interactive, pannable and zoomable canvas pages. It uses a custom `"canvas"` [[layout#Page Frames|page frame]] that provides a fullscreen, always-on canvas experience with a togglable left sidebar for navigation. It supports the full [JSON Canvas 1.0 spec](https://jsoncanvas.org/spec/1.0/), including text nodes with Markdown rendering, file nodes that link to other pages in your vault, link nodes for external URLs, and group nodes for visual organization. Edges between nodes are rendered as SVG paths with optional labels, arrow markers, and colors.
+6 -2
View File
@@ -1,7 +1,12 @@
---
title: "Citations"
title: Citations
description: Academic citation and bibliography support via BibTeX.
tags:
- plugin/transformer
image: https://images.unsplash.com/photo-1582079133805-43655f026448
repository: "[quartz-community/citations](https://github.com/quartz-community/citations)"
enabled: false
required: false
---
This plugin adds Citation support to Quartz.
@@ -15,7 +20,6 @@ This plugin accepts the following configuration options:
- `suppressBibliography`: whether to suppress the bibliography at the end of the document. Defaults to `false`.
- `linkCitations`: whether to link citations to the bibliography. Defaults to `false`.
- `csl`: the citation style to use. Defaults to `apa`. Reference [rehype-citation](https://rehype-citation.netlify.app/custom-csl) for more options.
- `prettyLink`: whether to use pretty links for citations. Defaults to `true`.
## API
+6 -1
View File
@@ -1,7 +1,12 @@
---
title: Comments
description: Comment system integration (Giscus, Utterances, etc.).
tags:
- plugin/component
image: "[[giscus-results.png]]"
repository: "[quartz-community/comments](https://github.com/quartz-community/comments)"
enabled: false
required: false
---
Comment system (giscus, utterances, etc.).
@@ -9,7 +14,7 @@ Comment system (giscus, utterances, etc.).
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
See [[comments]] for detailed usage information.
See [[plugins/Comments]] for detailed usage information.
## Configuration
+1
View File
@@ -2,6 +2,7 @@
title: ComponentResources
tags:
- plugin/emitter
image:
---
This plugin manages and emits the static resources required for the Quartz framework. This includes CSS stylesheets and JavaScript scripts that enhance the functionality and aesthetics of the generated site. See also the `cdnCaching` option in the `theme` section of the [[configuration]].
+6 -1
View File
@@ -1,7 +1,12 @@
---
title: ContentIndex
description: Generates sitemap, RSS feed, and content index.
tags:
- plugin/emitter
image:
repository: "[quartz-community/content-index](https://github.com/quartz-community/content-index)"
enabled: true
required: false
---
This plugin emits both RSS and an XML sitemap for your site. The [[RSS Feed]] allows users to subscribe to content on your site and the sitemap allows search engines to better index your site. The plugin also emits a `contentIndex.json` file which is used by dynamic frontend components like search and graph.
@@ -16,7 +21,7 @@ This plugin accepts the following configuration options:
- `enableSiteMap`: If `true` (default), generates a sitemap XML file (`sitemap.xml`) listing all site URLs for search engines in content discovery.
- `enableRSS`: If `true` (default), produces an RSS feed (`index.xml`) with recent content updates.
- `rssLimit`: Defines the maximum number of entries to include in the RSS feed, helping to focus on the most recent or relevant content. Defaults to `10`.
- `rssFullHtml`: If `true`, the RSS feed includes full HTML content. Otherwise it includes just summaries.
- `rssFullHtml`: If `true`, the RSS feed includes the full rendered HTML content of each page. Defaults to `false`.
- `rssSlug`: Slug to the generated RSS feed XML file. Defaults to `"index"`.
- `includeEmptyFiles`: If `true` (default), content files with no body text are included in the generated index and resources.
+5
View File
@@ -1,7 +1,12 @@
---
title: ContentMeta
description: Displays creation date and reading time.
tags:
- plugin/component
image:
repository: "[quartz-community/content-meta](https://github.com/quartz-community/content-meta)"
enabled: true
required: false
---
This plugin displays content metadata below the article title, such as the creation date and estimated reading time.
+5
View File
@@ -1,7 +1,12 @@
---
title: ContentPage
description: Generates HTML pages for Markdown content.
tags:
- plugin/pageType
image:
repository: "[quartz-community/content-page](https://github.com/quartz-community/content-page)"
enabled: true
required: false
---
This plugin is a page type plugin for the Quartz framework. It generates the HTML pages for each piece of Markdown content. It emits the full-page [[layout]], including headers, footers, and body content, among others. It uses the `default` [[layout#Page Frames|page frame]] (three-column layout with sidebars). It is now configured in the `pageTypes` section of `quartz.config.yaml`.
+6
View File
@@ -1,7 +1,12 @@
---
title: CrawlLinks
description: Parses and resolves internal links. Removing it is not recommended.
tags:
- plugin/transformer
image:
repository: "[quartz-community/crawl-links](https://github.com/quartz-community/crawl-links)"
enabled: true
required: true
---
This plugin parses links and processes them to point to the right places. It is also needed for embedded links (like images). See [[Obsidian compatibility]] for more information.
@@ -19,6 +24,7 @@ This plugin accepts the following configuration options:
- `openLinksInNewTab`: If `true`, configures external links to open in a new tab. Defaults to `false`.
- `lazyLoad`: If `true`, adds lazy loading to resource elements (`img`, `video`, etc.) to improve page load performance. Defaults to `false`.
- `externalLinkIcon`: Adds an icon next to external links when `true` (default) to visually distinguishing them from internal links.
- `disableBrokenWikilinks`: If `true`, internal links whose resolved slug is not present in the site (i.e. no matching file under `markdownLinkResolution`) gain an additional `broken` CSS class alongside `internal`, so they can be styled distinctly. Defaults to `false`. Applies to both wikilinks and regular Markdown links, since both are indistinguishable `<a>` elements by the time this plugin runs.
> [!warning]
> Removing this plugin is _not_ recommended and will likely break the page.
+8 -2
View File
@@ -1,7 +1,12 @@
---
title: "CreatedModifiedDate"
title: CreatedModifiedDate
description: Determines creation and modification dates from frontmatter, git, or filesystem.
tags:
- plugin/transformer
image:
repository: "[quartz-community/created-modified-date](https://github.com/quartz-community/created-modified-date)"
enabled: true
required: false
---
This plugin determines the created, modified, and published dates for a document using three potential data sources: frontmatter metadata, Git history, and the filesystem. See [[authoring content#Syntax]] for more information.
@@ -12,11 +17,12 @@ This plugin determines the created, modified, and published dates for a document
This plugin accepts the following configuration options:
- `priority`: The data sources to consult for date information. Highest priority first. Possible values are `"frontmatter"`, `"git"`, and `"filesystem"`. Defaults to `["frontmatter", "git", "filesystem"]`.
- `defaultDateType`: Which date type to use when displaying dates. Can be `"created"`, `"modified"`, or `"published"`. Defaults to `"modified"`.
When loading the frontmatter, the value of [[Frontmatter#List]] is used.
> [!warning]
> If you rely on `git` for dates, make sure `defaultDateType` is set to `modified` in `quartz.config.yaml`.
> If you rely on `git` for dates, make sure `defaultDateType` is set to `modified` in the plugin's options.
>
> Depending on how you [[hosting|host]] your Quartz, the `filesystem` dates of your local files may not match the final dates. In these cases, it may be better to use `git` or `frontmatter` to guarantee correct dates.
+18 -9
View File
@@ -1,7 +1,12 @@
---
title: Custom OG Images
description: Generates Open Graph social preview images.
tags:
- feature/emitter
image: "[[social-image-preview-dark.png]]"
repository: "[quartz-community/og-image](https://github.com/quartz-community/og-image)"
enabled: true
required: false
---
The Custom OG Images emitter plugin generates social media preview images for your pages. It uses [satori](https://github.com/vercel/satori) to convert HTML/CSS into images, allowing you to create beautiful and consistent social media preview cards for your content.
@@ -39,26 +44,30 @@ plugins:
For the TS override approach (needed for custom `imageStructure`):
```ts title="quartz.ts (override)"
import * as ExternalPlugin from "./.quartz/plugins"
import { defaultImage } from "./quartz/plugins/emitters/ogImage"
CustomOgImages({
// Must be placed before loadQuartzConfig()
ExternalPlugin.CustomOgImages({
colorScheme: "lightMode",
width: 1200,
height: 630,
excludeRoot: false,
imageStructure: defaultImage, // custom JSX component — requires TS
imageStructure: defaultImage,
})
```
### Configuration Options
| Option | Type | Default | Description |
| ---------------- | --------- | ------------ | ----------------------------------------------------------------- |
| `colorScheme` | string | "lightMode" | Theme to use for generating images ("darkMode" or "lightMode") |
| `width` | number | 1200 | Width of the generated image in pixels |
| `height` | number | 630 | Height of the generated image in pixels |
| `excludeRoot` | boolean | false | Whether to exclude the root index page from auto-generated images |
| `imageStructure` | component | defaultImage | Custom component to use for image generation |
| Option | Type | Default | Description |
| -------------------- | --------- | ------------------------- | ----------------------------------------------------------------- |
| `colorScheme` | string | "lightMode" | Theme to use for generating images ("darkMode" or "lightMode") |
| `width` | number | 1200 | Width of the generated image in pixels |
| `height` | number | 630 | Height of the generated image in pixels |
| `excludeRoot` | boolean | false | Whether to exclude the root index page from auto-generated images |
| `defaultTitle` | string | "Untitled" | Fallback title when a page has no title |
| `defaultDescription` | string | "No description provided" | Fallback description when a page has no description |
| `imageStructure` | component | defaultImage | Custom component to use for image generation |
## Frontmatter Properties
+6 -1
View File
@@ -1,7 +1,12 @@
---
title: Darkmode
description: Toggle between light and dark themes.
tags:
- plugin/component
image: "#0052cc"
repository: "[quartz-community/darkmode](https://github.com/quartz-community/darkmode)"
enabled: true
required: false
---
Dark mode toggle.
@@ -9,7 +14,7 @@ Dark mode toggle.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
See [[darkmode]] for detailed usage information.
See [[plugins/Darkmode]] for detailed usage information.
## Configuration
+7 -1
View File
@@ -1,7 +1,12 @@
---
title: Description
description: Generates page descriptions for metadata and previews.
tags:
- plugin/transformer
image:
repository: "[quartz-community/description](https://github.com/quartz-community/description)"
enabled: true
required: false
---
This plugin generates descriptions that are used as metadata for the HTML `head`, the [[RSS Feed]] and in [[folder and tag listings]] if there is no main body content, the description is used as the text between the title and the listing.
@@ -13,7 +18,8 @@ If the frontmatter contains a `description` property, it is used (see [[authorin
This plugin accepts the following configuration options:
- `descriptionLength`: the maximum length of the generated description. Default is 150 characters. The cut off happens after the first _sentence_ that ends after the given length.
- `descriptionLength`: the target length of the generated description. Default is 150 characters. The cut off happens after the first _sentence_ that ends after the given length.
- `maxDescriptionLength`: the hard maximum length of the description. If the generated description exceeds this, it is truncated with an ellipsis. Default is 300 characters.
- `replaceExternalLinks`: If `true` (default), replace external links with their domain and path in the description (e.g. `https://domain.tld/some_page/another_page?query=hello&target=world` is replaced with `domain.tld/some_page/another_page`).
## API
+8 -5
View File
@@ -1,24 +1,27 @@
---
title: Encrypted Pages Demo
password: quartz
unlisted: true
tags:
- plugin/transformer
image:
---
Congratulations! You've successfully decrypted this page. 🎉
This is a live demo of the [[EncryptedPages]] plugin. The content you're reading was encrypted at build time using AES-256-GCM and decrypted in your browser using the Web Crypto API.
This is a live demo of the [[EncryptedPages]] plugin. The content you're reading was encrypted at build time using AES-256-GCM and decrypted in your browser using the Web Crypto API. This page is also `unlisted: true`, which means it was hidden from every discovery surface on the site until you entered the password.
## What just happened?
1. At build time, the plugin read the `password` field from this page's frontmatter and encrypted all content below the title.
2. When you visited this page, you were shown a password prompt instead of the page content.
3. After entering the correct password, the plugin derived an encryption key using PBKDF2 and decrypted the content client-side.
4. A `render` event was dispatched so other components (graph, explorer, etc.) could re-initialize with the decrypted content.
2. Because this page is `unlisted: true`, the plugin emitted its metadata (slug, title, links, tags) to a separate `static/encryptedContentIndex.json` file, encrypted with this page's own password.
3. When you visited this page, you were shown a password prompt instead of the content. The page was absent from the sidebar graph, explorer, search, RSS, sitemap, backlinks, tag listings, and bases views.
4. After entering the correct password, the plugin derived an encryption key using PBKDF2 and decrypted the content client-side.
5. The plugin then used the cached password to unlock this page's entry in the shadow content index and patched the in-memory content index in place. A `content-index-updated` event was dispatched, so graph, explorer, and search re-initialized with the newly unlocked entry — if you navigate back to any other page now, you will see this page in the sidebar, the graph, and search results. Server-side rendered listings (backlinks, recent notes, tag pages, folder listings, and [[BasesPage|bases views]]) were baked into HTML at build time and will not update within this session; they will only reflect decrypted pages on a fresh build of the site.
## Password caching
Your password has been cached in session storage. If there were other encrypted pages on this site, the plugin would automatically try this password before showing the prompt — so you'd only need to enter it once per session for pages that share the same password.
Your password has been cached in session storage. If there were other encrypted pages on this site with the same password, the plugin would automatically try this password on each one — unlocking its content as well as its entry in the shadow content index — so you'd only need to enter it once per session.
## Try it yourself
+72 -15
View File
@@ -1,11 +1,17 @@
---
title: EncryptedPages
description: Password-protected encrypted pages with shadow content index.
tags:
- plugin/transformer
- plugin/filter
- plugin/emitter
image: "#FF1493"
new-in-v5: true
repository: "[quartz-community/encrypted-pages](https://github.com/quartz-community/encrypted-pages)"
enabled: true
required: false
---
Password-protected encrypted pages. Encrypts page content at build time using AES-256-GCM and decrypts client-side with the Web Crypto API. Passwords are set per-page via frontmatter.
Password-protected encrypted pages. Encrypts page content at build time using AES-256-GCM and decrypts client-side with the Web Crypto API. Passwords are set per-page via frontmatter. A companion emitter writes an encrypted shadow content index so unlisted encrypted pages can be dynamically revealed in graph, explorer, and search after a successful decryption — without ever leaking their metadata to visitors who do not hold the password.
> [!example] Live demo
> Try it yourself: [[EncryptedPages Demo]]. The password is `quartz`.
@@ -28,19 +34,65 @@ The page content will be encrypted at build time. Visitors must enter the correc
Successful passwords are cached in the browser's session storage and automatically tried on other encrypted pages for convenience.
### Hiding encrypted pages from discovery surfaces
By default, encrypted pages still appear in the graph, explorer, search, RSS, sitemap, and backlinks — visitors can see the page exists and its title, but cannot read the content without the password.
To hide an encrypted page entirely until a visitor successfully decrypts it, set `unlisted: true` in its frontmatter:
```yaml
---
title: My Secret Page
password: mysecretpassword
unlisted: true
---
```
An unlisted page:
- Is **absent** from `contentIndex.json`, `sitemap.xml`, the RSS feed, backlinks, recent notes, folder listings, tag listings, bases views, graph, explorer, and search.
- Is still emitted as HTML, so it remains accessible by direct URL.
- Has its metadata (slug, title, links, tags) written to a separate `static/encryptedContentIndex.json` file, encrypted with the page's own password.
- Is dynamically re-added to the in-memory content index when a visitor successfully decrypts it, so graph, explorer, and search reflect it for the rest of the browser session. Server-rendered listings — backlinks, recent notes, tag pages, folder listings, and [[BasesPage|bases views]] — remain statically hidden even after decryption because they are baked as HTML at build time.
To make this the default for every encrypted page on your site, set `unlistWhenEncrypted: true` in the plugin options. Individual pages can then opt back in with `unlisted: false`.
> [!note]
> The `unlisted: true` frontmatter field above only takes effect for encrypted pages when this plugin is installed. If you also want `unlisted: true` to work on **non-encrypted** pages across your site, install [[UnlistedPages]] alongside this one. The two plugins compose cleanly — when both are enabled, `unlisted: true` hides any page, encrypted or not, from every discovery surface that respects the `file.data.unlisted` convention.
### Permanently hiding encrypted pages (`stealth`)
By default, an `unlisted: true` encrypted page is _revealed_ in graph, explorer, and search after a visitor successfully decrypts it. This is usually what you want: the user just proved they know the password, so showing them the page in the sidebar makes sense for the rest of their session.
If you instead want a page that stays permanently invisible — accessible only by direct URL, even to users who have successfully decrypted other pages on the same site — set `stealth: true` in its frontmatter:
```yaml
---
title: Deep Secret
password: mysecretpassword
stealth: true
---
```
A stealth page:
- Is **absent** from every discovery surface, same as any `unlisted` page.
- Has **no entry** in the shadow content index (`encryptedContentIndex.json`). The plugin deliberately skips stealth pages when building the shadow index.
- Stays hidden even after the visitor enters the correct password. Since there is no shadow-index entry to decrypt, there is nothing to patch into the in-memory content index — graph, explorer, and search never learn the page exists. Only the decrypted HTML is visible to the user on the page itself.
- The password is still cached in session storage, so re-visiting the same stealth page will auto-unlock it.
`stealth: true` implies `unlisted: true` — you do not need to set both, and if you write `stealth: true, unlisted: false` the stealth flag wins. On non-encrypted pages `stealth: true` has no effect (there is no shadow index to skip).
Use stealth pages for "secret door" content that should only reach users who already know the exact URL: private notes linked from an external wiki, personal pages you send to specific people, or anything you never want to show up in a site-internal search even to authenticated readers.
## Configuration
This plugin provides a transformer, a filter, and a component.
This plugin provides a transformer, an emitter, and a component. All options are set on a single config entry and shared between the transformer and the emitter — Quartz instantiates both automatically.
### Transformer options
- `visibility`: How encrypted pages appear in graph, explorer, and backlinks. `"visible"` shows the page normally, `"icon"` adds a lock indicator, `"hidden"` hides the page completely. Defaults to `"icon"`.
- `iterations`: PBKDF2 iteration count for key derivation. Higher values are more secure but slower to unlock. Defaults to `600000`.
- `passwordField`: Frontmatter field name that holds the page password. Defaults to `"password"`.
### Filter options
- `visibility`: Controls whether encrypted pages appear in search, RSS, and sitemap. When set to `"hidden"`, encrypted pages are excluded from content indices entirely. Defaults to `"icon"`.
- `passwordField`: Frontmatter field name that holds the page password. Shared by the transformer and the emitter. Defaults to `"password"`.
- `unlistWhenEncrypted`: If `true`, every encrypted page is marked `unlisted` unless its frontmatter explicitly overrides it. Defaults to `false`.
- `outputPath`: Output path for the shadow content index, relative to Quartz's output directory. Defaults to `"static/encryptedContentIndex.json"`.
### Component options
@@ -52,21 +104,26 @@ This plugin provides a transformer, a filter, and a component.
- source: github:quartz-community/encrypted-pages
enabled: true
options:
visibility: icon
iterations: 600000
passwordField: password
unlistWhenEncrypted: false
outputPath: static/encryptedContentIndex.json
```
> [!warning]
> The `EncryptedPages` transformer replaces the entire HAST tree of an encrypted page with an opaque ciphertext container. Any transformer that needs to read the real HTML — in particular [[CrawlLinks]], which populates the links used by backlinks and the shadow content index — must run **before** `EncryptedPages`. Use the `order` field in `quartz.config.yaml` to control this.
## Security
- Content is encrypted with AES-256-GCM using PBKDF2 SHA-256 key derivation.
- Plaintext is stripped from search indices and RSS feeds regardless of visibility setting.
- Plaintext is stripped from search indices, RSS feeds, and the shadow content index regardless of visibility setting.
- The shadow content index is a flat array of opaque encrypted blobs. An attacker who downloads it learns only the number of unlisted encrypted pages and the PBKDF2 iteration count — no slugs, titles, or link relationships leak.
- Passwords are set per-page in frontmatter. Avoid committing passwords to public repositories.
- This is client-side encryption of a static site. It protects against casual browsing but not against determined attackers with access to the page source.
## API
- Category: Transformer, Filter
- Function name: `ExternalPlugin.EncryptedPages()`, `ExternalPlugin.EncryptedPageFilter()`.
- Category: Transformer, Emitter
- Function name: `ExternalPlugin.EncryptedPages()`, `ExternalPlugin.EncryptedContentIndex()`.
- Source: [`quartz-community/encrypted-pages`](https://github.com/quartz-community/encrypted-pages)
- Install: `npx quartz plugin add github:quartz-community/encrypted-pages`
+5
View File
@@ -1,7 +1,12 @@
---
title: ExplicitPublish
description: "Only publishes pages explicitly marked with publish: true."
tags:
- plugin/filter
image:
repository: "[quartz-community/explicit-publish](https://github.com/quartz-community/explicit-publish)"
enabled: false
required: false
---
This plugin filters content based on an explicit `publish` flag in the frontmatter, allowing only content that is explicitly marked for publication to pass through. It's the opt-in version of [[RemoveDrafts]]. See [[private pages]] for more information.
+33 -3
View File
@@ -1,7 +1,12 @@
---
title: Explorer
description: File tree explorer sidebar.
tags:
- plugin/component
image:
repository: "[quartz-community/explorer](https://github.com/quartz-community/explorer)"
enabled: true
required: false
---
File tree explorer sidebar.
@@ -9,17 +14,26 @@ File tree explorer sidebar.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
See [[explorer]] for detailed usage information.
See [[plugins/Explorer]] for detailed usage information.
## Configuration
This plugin accepts the following configuration options:
**YAML options** (in `quartz.config.yaml`):
- `title`: The title of the explorer. Defaults to `Explorer`.
- `folderClickBehavior`: The behavior when a folder is clicked. Can be `"link"` to navigate or `"collapse"` to toggle. Defaults to `collapse`.
- `folderClickBehavior`: The behavior when a folder is clicked. Can be `"link"` to navigate or `"collapse"` to toggle. Defaults to `link`.
- `folderDefaultState`: The default state of folders. Can be `"collapsed"` or `"open"`. Defaults to `collapsed`.
- `useSavedState`: Whether to use local storage to save the state of the explorer. Defaults to `true`.
**TS override options** (in `quartz.ts`, for callback functions that can't be expressed in YAML):
- `sortFn`: Custom sort function for ordering files and folders.
- `filterFn`: Custom filter function to exclude specific nodes.
- `mapFn`: Custom map function to transform node properties (e.g. display names).
- `order`: Array controlling the order of operations. Defaults to `["filter", "map", "sort"]`.
### Default options
```yaml title="quartz.config.yaml"
@@ -27,11 +41,27 @@ This plugin accepts the following configuration options:
enabled: true
options:
title: Explorer
folderClickBehavior: collapse
folderClickBehavior: link
folderDefaultState: collapsed
useSavedState: true
```
### TS override example
```ts title="quartz.ts"
import * as ExternalPlugin from "./.quartz/plugins"
// Must be placed before loadQuartzConfig()
ExternalPlugin.Explorer({
mapFn: (node) => {
node.displayName = node.displayName.toUpperCase()
return node
},
})
```
See [[features/explorer#Advanced customization]] for more examples.
## API
- Category: Component
+5
View File
@@ -1,7 +1,12 @@
---
title: Favicon
description: Emits the site favicon.
tags:
- plugin/emitter
image:
repository: "[quartz-community/favicon](https://github.com/quartz-community/favicon)"
enabled: true
required: false
---
This plugin emits a `favicon.ico` into the `public` folder. It creates the favicon from `icon.png` located in the `quartz/static` folder.
+9 -1
View File
@@ -1,7 +1,12 @@
---
title: FolderPage
description: Generates listing pages for folders.
tags:
- plugin/pageType
image:
repository: "[quartz-community/folder-page](https://github.com/quartz-community/folder-page)"
enabled: true
required: false
---
This plugin is a page type plugin that generates index pages for folders, creating a listing page for each folder that contains multiple content files. It uses the `default` [[layout#Page Frames|page frame]] (three-column layout with sidebars). See [[folder and tag listings]] for more information.
@@ -13,7 +18,10 @@ Example: [[advanced/|Advanced]]
This plugin accepts the following configuration options:
- `sort`: A function of type `(f1: QuartzPluginData, f2: QuartzPluginData) => number{:ts}` used to sort entries. Defaults to sorting by date and tie-breaking on lexographical order.
- `showFolderCount`: Whether to display the number of pages in the folder. Defaults to `true`.
- `showSubfolders`: Whether to include pages from subfolders in the listing. Defaults to `true`.
- `sort`: A function of type `(f1: QuartzPluginData, f2: QuartzPluginData) => number{:ts}` used to sort entries. Defaults to sorting by date and tie-breaking on lexographical order. Requires a TS override.
- `prefixFolders`: If `true`, generated folder page titles are prefixed with "Folder: " (e.g. "Folder: notes"). Defaults to `false`.
## API
+226
View File
@@ -0,0 +1,226 @@
---
title: Fonts
description: Fine-grained font control with per-heading support, Google Fonts integration, and theme font discovery.
tags:
- plugin/transformer
- plugin/emitter
image:
repository: "[quartz-community/fonts](https://github.com/quartz-community/fonts)"
enabled: true
required: false
---
This plugin provides fine-grained control over fonts in your Quartz site. It supports per-heading font families, automatic theme font discovery when used with [Quartz Themes](https://github.com/saberzero1/quartz-themes), Google Fonts integration with automatic weight and italic loading, and falls back to Obsidian's default system font stacks.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
## Why use Fonts?
Quartz uses three CSS variables for fonts: `--headerFont`, `--bodyFont`, and `--codeFont`. Obsidian themes use a different system with per-heading variables (`--h1-font` through `--h6-font`), `--font-text`, and `--font-monospace`. These two systems don't bridge correctly, causing heading fonts to not render as themes intend.
Fonts solves this by:
1. Bridging the Obsidian and Quartz font systems
2. Emitting **unlayered** CSS that correctly overrides Quartz's base heading styles
3. Providing per-heading font control that neither system offers alone
4. Optionally loading fonts from Google Fonts with fine-grained weight and italic control
## Configuration
Font options accept either a CSS font-family string or an object with Google Fonts loading control:
```yaml
# String form
body: '"Inter", sans-serif'
# Object form (for Google Fonts weight/italic control)
body:
name: Inter
weights: [400, 600, 700]
includeItalic: true
```
This plugin accepts the following configuration options:
| Option | Type | Default | Description |
| --------------- | ------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `title` | `FontSpecification` | `header` value | Font family for the site title. |
| `body` | `FontSpecification` | Obsidian default | Font family for body text. |
| `header` | `FontSpecification` | Obsidian default | Default font family for all headings (h1-h6). |
| `code` | `FontSpecification` | Obsidian default | Font family for code and monospace elements. |
| `interface` | `FontSpecification` | Obsidian default | Font family for UI elements. |
| `h1` – `h6` | `FontSpecification` | `header` value | Per-heading font family overrides. |
| `useThemeFonts` | `boolean` | `true` | Use fonts from [Quartz Themes](https://github.com/saberzero1/quartz-themes) as defaults when it is installed. |
| `fontOrigin` | `string` | `"googleFonts"` | `"googleFonts"` to load from Google Fonts CDN, `"selfHosted"` to download and serve locally, `"local"` for no loading. |
### Default options
```yaml title="quartz.config.yaml"
- source: github:quartz-community/fonts
enabled: true
options:
useThemeFonts: true
fontOrigin: googleFonts
```
### Font resolution
Fonts are resolved using a priority chain:
```
User config (plugin options)
→ Theme fonts (from Quartz Themes, if installed)
→ Obsidian defaults (system font stacks)
```
For individual headings:
```
h1 option → header option → theme --h1-font → theme font → Obsidian default
```
For the site title:
```
title option → header option → theme font → Obsidian default
```
## Usage with Quartz Themes
When [Quartz Themes](https://github.com/saberzero1/quartz-themes) is installed and enabled, Fonts automatically discovers the theme's font metadata and uses it as defaults. Any options you explicitly set in Fonts will override the theme fonts.
Fonts must run **after** Quartz Themes. This is handled automatically by plugin ordering (Quartz Themes = 10, Fonts = 60).
> [!warning]
> If Quartz Themes is enabled but hasn't run yet when Fonts executes, you'll see a warning in the console. Make sure Quartz Themes has a lower `defaultOrder` than Fonts.
## Usage without Quartz Themes
Fonts works standalone. Without a theme, it falls back to Obsidian's default system font stacks. You can set fonts explicitly via the plugin options.
## Examples
```yaml title="quartz.config.yaml"
# Use theme fonts automatically (default behavior)
- source: github:quartz-community/fonts
enabled: true
# Override just the heading font
- source: github:quartz-community/fonts
enabled: true
options:
header: '"Playfair Display", serif'
# Full control with per-heading fonts
- source: github:quartz-community/fonts
enabled: true
options:
body: '"Inter", sans-serif'
header: '"Playfair Display", serif'
code: '"JetBrains Mono", monospace'
h1: '"Playfair Display", serif'
h2: '"Lora", serif'
# Load from Google Fonts automatically
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: googleFonts
body: Inter
header: Playfair Display
code: JetBrains Mono
# Google Fonts with weight/italic control
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: googleFonts
body:
name: Inter
weights: [400, 600, 700]
includeItalic: true
header:
name: Playfair Display
weights: [400, 700]
code:
name: JetBrains Mono
weights: [400]
# Custom title font (separate from header)
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: googleFonts
title: Abril Fatface
header: Playfair Display
body: Inter
code: JetBrains Mono
# Self-hosted fonts (downloaded at build time, no external requests)
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: selfHosted
body: Inter
header: Playfair Display
code: JetBrains Mono
# Ignore theme fonts entirely
- source: github:quartz-community/fonts
enabled: true
options:
useThemeFonts: false
body: '"Inter", sans-serif'
```
## Self-Hosted Fonts
When `fontOrigin: selfHosted` is set, Fonts downloads fonts from Google Fonts during the build and serves them from your site's `static/fonts/` directory. This makes your site fully self-contained with no external requests to Google at runtime.
At build time, the plugin:
1. Fetches the Google Fonts CSS for your configured fonts
2. Downloads each font file (`.woff2`, `.woff`, etc.)
3. Writes the font files to `static/fonts/` in your build output
4. Generates a `quartz-fonts.css` file with `@font-face` rules pointing to the local files
> [!note]
> Self-hosted fonts require `baseUrl` to be set in your Quartz configuration, since font URLs in the CSS need an absolute path.
```yaml title="quartz.config.yaml"
configuration:
baseUrl: "example.com"
plugins:
- source: github:quartz-community/fonts
enabled: true
options:
fontOrigin: selfHosted
body: Inter
header: Playfair Display
code: JetBrains Mono
```
## Google Fonts Validation
When `fontOrigin: googleFonts` is set and the optional [`google-font-metadata`](https://www.npmjs.com/package/google-font-metadata) package is installed, Fonts validates your font configuration at build time:
- Checks that font family names exist in Google Fonts.
- Warns if requested weights are not available for a font.
- Warns if italic is requested but the font doesn't support it.
Install it to enable validation:
```bash
npm install google-font-metadata
```
Validation warnings are logged to the console but do not block the build.
## API
- Category: Transformer, Emitter
- Function name: `ExternalPlugin.Fonts()` (transformer), `ExternalPlugin.FontsEmitter()` (emitter).
- Source: [`quartz-community/fonts`](https://github.com/quartz-community/fonts)
- Install: `npx quartz plugin add github:quartz-community/fonts`
+5
View File
@@ -1,7 +1,12 @@
---
title: Footer
description: Page footer with configurable links.
tags:
- plugin/component
image:
repository: "[quartz-community/footer](https://github.com/quartz-community/footer)"
enabled: true
required: false
---
This plugin renders a footer at the bottom of the page with a "Created with Quartz" message and a set of configurable links.
+25 -21
View File
@@ -1,14 +1,18 @@
---
title: "Frontmatter"
title: Frontmatter
aliases:
- note-properties
- Note Properties
description: "Parses frontmatter and displays note properties in a collapsible panel."
description: Parses frontmatter and displays note properties in a collapsible panel.
tags:
- plugin/transformer
- plugin/component
publish: true
enableToc: true
image:
repository: "[quartz-community/note-properties](https://github.com/quartz-community/note-properties)"
enabled: true
required: true
---
This plugin parses the frontmatter of the page using the [gray-matter](https://github.com/jonschlinkert/gray-matter) library and optionally displays selected properties in a collapsible panel. See [[authoring content#Syntax]], [[Obsidian compatibility]] and [[OxHugo compatibility]] for more information.
@@ -51,7 +55,7 @@ This plugin accepts the following configuration options:
When enabled, this plugin renders a collapsible "Properties" panel before the page body. The panel displays selected frontmatter fields in a table with automatic type rendering:
- **Strings** are shown as plain text. [[Wikilinks]] and [markdown links](https://example.com) within strings are rendered as clickable links.
- **Strings** are shown as plain text. [[wikilinks]] and [markdown links](https://example.com) within strings are rendered as clickable links. Wikilink targets are slugified the same way as body-content links (e.g. `[[My Note]]` resolves to `my-note`) and matching is case-insensitive to mirror Obsidian's behavior, so `[[MyNote]]`, `[[mynote]]`, and `[[MYNOTE]]` all point to the same page.
- **Arrays** are rendered as comma-separated lists.
- **Booleans** are rendered as disabled checkboxes.
- **Numbers** are rendered in a monospace font.
@@ -80,24 +84,24 @@ quartz-properties-collapse: false
Quartz supports the following frontmatter fields. Where multiple keys are listed, they are aliases — the first matching key is used.
| Field | Keys | Description |
| ------------------ | ------------------------------------------------- | ------------------------------------------------------------------ |
| Title | `title` | Page title. Falls back to filename if empty. |
| Description | `description` | Page description for metadata and search. |
| Tags | `tags`, `tag` | Categorization tags. Automatically slugified. |
| Aliases | `aliases`, `alias` | Alternative names for the page, used for link resolution. |
| Permalink | `permalink` | Custom URL slug. Also added to aliases. |
| CSS classes | `cssclasses`, `cssclass` | CSS classes applied to the page body. |
| Social image | `socialImage`, `image`, `cover` | Image used for social media previews. |
| Social description | `socialDescription` | Description used specifically for social media previews. |
| Created date | `created`, `date` | When the note was created. |
| Modified date | `modified`, `lastmod`, `updated`, `last-modified` | When the note was last modified. Falls back to `created` if unset. |
| Published date | `published`, `publishDate`, `date` | When the note was published. |
| Publish | `publish` | Whether the note should be published. |
| Draft | `draft` | Whether the note is a draft. |
| Comments | `comments` | Whether comments are enabled for the note. |
| Language | `lang` | Language code for the note. |
| Enable TOC | `enableToc` | Whether to show the table of contents. |
| Field | Keys | Description |
| ------------------ | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title | `title` | Page title. Falls back to filename if empty. |
| Description | `description` | Page description for metadata and search. |
| Tags | `tags`, `tag` | Categorization tags. Slugified the same way as file paths: spaces become `-`, `&` becomes `-and-`, `%` becomes `-percent`, and tags are lowercased so that `#MyTag` and `#mytag` resolve to the same tag page (matching Obsidian). |
| Aliases | `aliases`, `alias` | Alternative names for the page, used for link resolution. |
| Permalink | `permalink` | Custom URL slug. Also added to aliases. |
| CSS classes | `cssclasses`, `cssclass` | CSS classes applied to the page body. |
| Social image | `socialImage`, `image`, `cover` | Image used for social media previews. |
| Social description | `socialDescription` | Description used specifically for social media previews. |
| Created date | `created`, `date` | When the note was created. |
| Modified date | `modified`, `lastmod`, `updated`, `last-modified` | When the note was last modified. Falls back to `created` if unset. |
| Published date | `published`, `publishDate`, `date` | When the note was published. |
| Publish | `publish` | Whether the note should be published. |
| Draft | `draft` | Whether the note is a draft. |
| Comments | `comments` | Whether comments are enabled for the note. |
| Language | `lang` | Language code for the note. |
| Enable TOC | `enableToc` | Whether to show the table of contents. |
## API
+5
View File
@@ -1,7 +1,12 @@
---
title: GitHubFlavoredMarkdown
description: GitHub Flavored Markdown support (tables, task lists, footnotes, strikethrough).
tags:
- plugin/transformer
image:
repository: "[quartz-community/github-flavored-markdown](https://github.com/quartz-community/github-flavored-markdown)"
enabled: true
required: false
---
This plugin enhances Markdown processing to support GitHub Flavored Markdown (GFM) which adds features like autolink literals, footnotes, strikethrough, tables and tasklists.
+16 -10
View File
@@ -1,7 +1,12 @@
---
title: Graph
description: Interactive link graph visualization.
tags:
- plugin/component
image:
repository: "[quartz-community/graph](https://github.com/quartz-community/graph)"
enabled: true
required: false
---
Interactive graph visualization.
@@ -23,16 +28,16 @@ Both `localGraph` and `globalGraph` accept the following options:
- `drag`: Enable dragging nodes. Defaults to `true`.
- `zoom`: Enable zooming. Defaults to `true`.
- `depth`: The depth of the graph. Defaults to `1` for local and `-1` for global.
- `scale`: The initial scale of the graph.
- `repelForce`: The force that pushes nodes apart.
- `centerForce`: The force that pulls nodes to the center.
- `linkDistance`: The distance between linked nodes.
- `fontSize`: The font size of node labels.
- `opacityScale`: The scale of node opacity.
- `removeTags`: Tags to exclude from the graph.
- `showTags`: Whether to show tags in the graph.
- `enableRadial`: Whether to enable radial layout.
- `focusOnHover`: Whether to focus on the hovered node (global only).
- `scale`: The initial scale of the graph. Defaults to `1.1` for local and `0.9` for global.
- `repelForce`: The force that pushes nodes apart. Defaults to `0.5`.
- `centerForce`: The force that pulls nodes to the center. Defaults to `0.3` for local and `0.2` for global.
- `linkDistance`: The distance between linked nodes. Defaults to `30`.
- `fontSize`: The font size of node labels. Defaults to `0.6`.
- `opacityScale`: The scale of node opacity. Defaults to `1`.
- `removeTags`: Tags to exclude from the graph. Defaults to `[]`.
- `showTags`: Whether to show tags in the graph. Defaults to `true`.
- `enableRadial`: Whether to enable radial layout. Defaults to `false` for local and `true` for global.
- `focusOnHover`: Whether to focus on the hovered node. Defaults to `false` for local and `true` for global.
### Default options
@@ -52,6 +57,7 @@ Both `localGraph` and `globalGraph` accept the following options:
opacityScale: 1
removeTags: []
showTags: true
focusOnHover: false
enableRadial: false
globalGraph:
drag: true
+5
View File
@@ -1,7 +1,12 @@
---
title: HardLineBreaks
description: Treats single newlines as hard line breaks.
tags:
- plugin/transformer
image: "#ff8000"
repository: "[quartz-community/hard-line-breaks](https://github.com/quartz-community/hard-line-breaks)"
enabled: false
required: false
---
This plugin automatically converts single line breaks in Markdown text into hard line breaks in the HTML output. This plugin is not enabled by default as this doesn't follow the semantics of actual Markdown but you may enable it if you'd like parity with [[Obsidian compatibility|Obsidian]].
+9 -1
View File
@@ -1,7 +1,12 @@
---
title: "Latex"
title: Latex
description: Renders LaTeX math expressions via KaTeX or Typst.
tags:
- plugin/transformer
image:
repository: "[quartz-community/latex](https://github.com/quartz-community/latex)"
enabled: true
required: false
---
This plugin adds LaTeX support to Quartz. See [[features/Latex|Latex]] for more information.
@@ -13,6 +18,9 @@ This plugin accepts the following configuration options:
- `renderEngine`: the engine to use to render LaTeX equations. Can be `"katex"` for [KaTeX](https://katex.org/), `"mathjax"` for [MathJax](https://www.mathjax.org/) [SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html), or `"typst"` for [Typst](https://typst.app/) (a new way to compose LaTeX equation). Defaults to KaTeX.
- `customMacros`: custom macros for all LaTeX blocks. It takes the form of a key-value pair where the key is a new command name and the value is the expansion of the macro. For example: `{"\\R": "\\mathbb{R}"}`
- `katexOptions`: Additional options passed to the KaTeX renderer. See the [KaTeX docs](https://katex.org/docs/options) for available options.
- `mathJaxOptions`: Additional options passed to the MathJax renderer. See the [MathJax docs](https://docs.mathjax.org/en/latest/options/) for available options.
- `typstOptions`: Additional options passed to the Typst renderer.
## API
+1
View File
@@ -2,6 +2,7 @@
title: NotFoundPage
tags:
- plugin/pageType
image:
---
This plugin emits a 404 (Not Found) page for broken or non-existent URLs. It uses the `minimal` [[layout#Page Frames|page frame]] (no sidebars, no header or beforeBody chrome — only content and footer) to present a clean error page.
+6
View File
@@ -1,7 +1,13 @@
---
title: NoteProperties
description: Displays frontmatter properties in a collapsible panel.
tags:
- plugin/component
image:
new-in-v5: true
repository: "[quartz-community/note-properties](https://github.com/quartz-community/note-properties)"
enabled: true
required: true
---
The NoteProperties plugin is documented under [[Frontmatter]].
+8 -1
View File
@@ -1,7 +1,12 @@
---
title: ObsidianFlavoredMarkdown
description: Obsidian-specific Markdown extensions (wikilinks, callouts, highlights, tags, embeds).
tags:
- plugin/transformer
image:
repository: "[quartz-community/obsidian-flavored-markdown](https://github.com/quartz-community/obsidian-flavored-markdown)"
enabled: true
required: false
---
This plugin provides support for [[Obsidian compatibility]].
@@ -24,7 +29,9 @@ This plugin accepts the following configuration options:
- `enableVideoEmbed`: If `true` (default), enables the embedding of video files.
- `enableCheckbox`: If `true`, adds support for interactive checkboxes in content, including custom task characters (e.g. `- [?]`, `- [!]`, `- [/]`). Defaults to `false`.
- `enableObsidianUri`: If `true` (default), marks `obsidian://` protocol links with a CSS class and data attribute for custom styling.
- `disableBrokenWikilinks`: If `true`, replaces links to non-existent notes with a dimmed, disabled link. Defaults to `false`.
> [!note]
> The `disableBrokenWikilinks` option previously lived on this plugin. It has moved to [[CrawlLinks]], which owns link resolution and can honor the configured `markdownLinkResolution` strategy when deciding whether a link is broken. Users upgrading from earlier Quartz v5 betas should move the option from `ObsidianFlavoredMarkdown` to `CrawlLinks`.
> [!warning]
> Don't remove this plugin if you're using [[Obsidian compatibility|Obsidian]] to author the content!
+5
View File
@@ -1,7 +1,12 @@
---
title: OxHugoFlavoredMarkdown
description: Compatibility for ox-hugo exported Org-mode files.
tags:
- plugin/transformer
image:
repository: "[quartz-community/ox-hugo](https://github.com/quartz-community/ox-hugo)"
enabled: false
required: false
---
This plugin provides support for [ox-hugo](https://github.com/kaushalmodi/ox-hugo) compatibility. See [[OxHugo compatibility]] for more information.
+5
View File
@@ -1,7 +1,12 @@
---
title: PageTitle
description: Renders the site title as a home link.
tags:
- plugin/component
image:
repository: "[quartz-community/page-title](https://github.com/quartz-community/page-title)"
enabled: true
required: false
---
This plugin renders the site-wide page title (configured via the `pageTitle` field in [[configuration]]) as a clickable link to the home page. It typically appears in the left sidebar.
+6
View File
@@ -1,7 +1,13 @@
---
title: ReaderMode
description: Distraction-free reading mode toggle.
tags:
- plugin/component
image:
new-in-v5: true
repository: "[quartz-community/reader-mode](https://github.com/quartz-community/reader-mode)"
enabled: true
required: false
---
Distraction-free reading mode.
+12 -5
View File
@@ -1,7 +1,12 @@
---
title: RecentNotes
description: Displays a list of recently modified notes.
tags:
- plugin/component
image:
repository: "[quartz-community/recent-notes](https://github.com/quartz-community/recent-notes)"
enabled: false
required: false
---
Shows recently modified notes.
@@ -16,9 +21,11 @@ See [[recent notes]] for detailed usage information.
This plugin accepts the following configuration options:
- `title`: The title of the recent notes section. Defaults to `Recent notes`.
- `limit`: The maximum number of recent notes to display. Defaults to `5`.
- `limit`: The maximum number of recent notes to display. Defaults to `3`.
- `showTags`: Whether to display the tags for each note. Defaults to `true`.
- `linkToMore`: A slug to a page that shows more notes. Defaults to `""`.
- `linkToMore`: A slug to a page that shows more notes. Defaults to `false`.
- `hideTagPages`: Whether to hide tag index pages from the list. Defaults to `false`.
- `hideFolderPages`: Whether to hide folder index pages from the list. Defaults to `false`.
### Default options
@@ -26,10 +33,10 @@ This plugin accepts the following configuration options:
- source: github:quartz-community/recent-notes
enabled: true
options:
title: Recent notes
limit: 5
limit: 3
showTags: true
linkToMore: ""
hideTagPages: false
hideFolderPages: false
```
## API
+5
View File
@@ -1,7 +1,12 @@
---
title: RemoveDrafts
description: Filters out pages marked as drafts.
tags:
- plugin/filter
image:
repository: "[quartz-community/remove-draft](https://github.com/quartz-community/remove-draft)"
enabled: true
required: false
---
This plugin filters out content from your vault, so that only finalized content is made available. This prevents [[private pages]] from being published. By default, it filters out all pages with `draft: true` in the frontmatter and leaves all other pages intact.
+9 -2
View File
@@ -1,13 +1,18 @@
---
title: RoamFlavoredMarkdown
description: Compatibility for Roam Research export format.
tags:
- plugin/transformer
image:
repository: "[quartz-community/roam](https://github.com/quartz-community/roam)"
enabled: false
required: false
---
This plugin provides support for [Roam Research](https://roamresearch.com) compatibility. See [[Roam Research Compatibility]] for more information.
This plugin provides support for [Roam Research](https://roamresearch.com) compatibility. See [[Roam Research compatibility]] for more information.
> [!note]
> For information on how to add, remove or configure plugins, see the [[Configuration#Plugins|Configuration]] page.
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
This plugin accepts the following configuration options:
@@ -18,6 +23,8 @@ This plugin accepts the following configuration options:
- `audioComponent`: If `true` (default), converts Roam `{{[[audio]]:URL}}` shortcodes into embeded HTML audio.
- `pdfComponent`: If `true` (default), converts Roam `{{[[pdf]]:URL}}` shortcodes into embeded HTML PDF viewer.
- `blockquoteComponent`: If `true` (default), converts Roam `{{[[>]]}}` shortcodes into Quartz blockquotes.
- `tableComponent`: If `true` (default), converts Roam table syntax into HTML tables.
- `attributeComponent`: If `true` (default), converts Roam attribute syntax into rendered attributes.
## API
+13 -1
View File
@@ -1,7 +1,12 @@
---
title: Search
description: Full-text search with tag filtering and keyboard navigation.
tags:
- plugin/component
image: https://images.unsplash.com/photo-1516382799247-87df95d790b7
repository: "[quartz-community/search](https://github.com/quartz-community/search)"
enabled: true
required: false
---
Full-text search functionality.
@@ -15,13 +20,20 @@ See [[full-text search]] for detailed usage information.
This plugin accepts the following configuration options:
- `enabled`: Whether to enable full-text search. Defaults to `true`.
- `enablePreview`: Whether to show a preview of the page content in search results. Defaults to `true`.
- `fieldPriority`: An array specifying the priority order for search fields. Defaults to `["title", "content", "tags"]`.
### Default options
```yaml title="quartz.config.yaml"
- source: github:quartz-community/search
enabled: true
options:
enablePreview: true
fieldPriority:
- title
- content
- tags
```
## API
+6
View File
@@ -1,7 +1,13 @@
---
title: Spacer
description: Flexible spacer for layout groups.
tags:
- plugin/component
image:
new-in-v5: true
repository: "[quartz-community/spacer](https://github.com/quartz-community/spacer)"
enabled: true
required: false
---
This plugin renders a flexible spacer element that pushes adjacent components apart within a layout group. It uses CSS `flex: 2 1 auto` to fill available space, making it useful for spacing out items in toolbars or sidebars (for example, separating the search bar from the darkmode toggle in the left sidebar toolbar).
+10 -8
View File
@@ -1,7 +1,13 @@
---
title: StackedPages
description: Andy Matuschak-style stacked sliding panes.
tags:
- plugin/component
image:
new-in-v5: true
repository: "[quartz-community/stacked-pages](https://github.com/quartz-community/stacked-pages)"
enabled: true
required: false
---
Andy Matuschak-style stacked pages (sliding panes). Clicking internal links opens pages side by side in a horizontal stack, allowing you to trace your path through your notes. Each pane shows a full page and can be individually scrolled or closed.
@@ -26,11 +32,9 @@ Stacked pages are disabled on mobile by default (below 800px) since horizontal p
This plugin accepts the following configuration options:
- `paneWidth`: Width of each stacked pane in pixels. Defaults to `640`.
- `maxPanes`: Maximum number of panes visible at once. Defaults to `5`.
- `enableOnMobile`: Whether to enable stacked pages on mobile devices. Defaults to `false`.
- `mobileBreakpoint`: Viewport width (in pixels) below which the mobile behavior applies. Matches the Quartz mobile breakpoint. Defaults to `800`.
- `showSpines`: Whether to show collapsed spine headers when panes overflow. Defaults to `true`.
- `maxTabs`: Maximum number of stacked panes visible at once. Defaults to `8`.
- `mobileBreakpoint`: Viewport width (in pixels) below which stacked pages are disabled and links navigate normally. Defaults to `800`.
- `showSpines`: Whether to show collapsed spine headers when panes overflow the viewport. Defaults to `true`.
- `animateTransitions`: Whether to animate pane open/close transitions. Defaults to `true`.
### Default options
@@ -43,9 +47,7 @@ This plugin accepts the following configuration options:
priority: 50
display: all
options:
paneWidth: 640
maxPanes: 5
enableOnMobile: false
maxTabs: 8
mobileBreakpoint: 800
showSpines: true
animateTransitions: true
+1
View File
@@ -2,6 +2,7 @@
title: Static
tags:
- plugin/emitter
image:
---
This plugin emits all static resources needed by Quartz. This is used, for example, for fonts and images that need a stable position, such as banners and icons. The plugin respects the `ignorePatterns` in the global [[configuration]].
+9 -2
View File
@@ -1,7 +1,12 @@
---
title: "SyntaxHighlighting"
title: SyntaxHighlighting
description: Syntax highlighting for code blocks.
tags:
- plugin/transformer
image: https://images.unsplash.com/photo-1580569214296-5cf2bffc5ccd
repository: "[quartz-community/syntax-highlighting](https://github.com/quartz-community/syntax-highlighting)"
enabled: true
required: false
---
This plugin is used to add syntax highlighting to code blocks in Quartz. See [[syntax highlighting]] for more information.
@@ -11,8 +16,10 @@ This plugin is used to add syntax highlighting to code blocks in Quartz. See [[s
This plugin accepts the following configuration options:
- `theme`: a separate id of one of the [themes bundled with Shikiji](https://shikiji.netlify.app/themes). One for light mode and one for dark mode. Defaults to `theme: { light: "github-light", dark: "github-dark" }`.
- `theme`: a separate id of one of the [themes bundled with Shikiji](https://shikiji.netlify.app/themes). One for light mode and one for dark mode. Defaults to `theme: { light: "github-light", dark: "github-dark" }`.
- `keepBackground`: If set to `true`, the background of the Shikiji theme will be used. With `false` (default) the Quartz theme color for background will be used instead.
- `clipboard`: Whether to add a copy-to-clipboard button to code blocks. Defaults to `true`.
- `tokenClassification`: Whether to add semantic token classification CSS classes to code tokens. Defaults to `true`.
In addition, you can further override the colours in the `quartz/styles/syntax.scss` file.
+8 -1
View File
@@ -1,7 +1,13 @@
---
title: TableOfContents
description: Generates and renders a table of contents from headings.
tags:
- plugin/transformer
- plugin/component
image: https://images.unsplash.com/photo-1768527338896-3765921e992d
repository: "[quartz-community/table-of-contents](https://github.com/quartz-community/table-of-contents)"
enabled: true
required: false
---
This plugin generates a table of contents (TOC) for Markdown documents. See [[table of contents]] for more information.
@@ -15,13 +21,14 @@ This plugin accepts the following configuration options:
- `minEntries`: The minimum number of heading entries required for the TOC to be displayed. Default is `1`.
- `showByDefault`: If `true` (default), the TOC should be displayed by default. Can be overridden by frontmatter settings.
- `collapseByDefault`: If `true`, the TOC will start in a collapsed state. Default is `false`.
- `layout`: The visual layout of the TOC component. Can be `"modern"` or `"legacy"`. Default is `"modern"`.
> [!warning]
> This plugin needs the `Plugin.TableOfContents` component in `quartz.config.yaml` to determine where to display the TOC. Without it, nothing will be displayed. They should always be added or removed together.
## API
- Category: Transformer
- Category: Transformer, Component
- Function name: `ExternalPlugin.TableOfContentsTransformer()`.
- Source: [`quartz-community/table-of-contents`](https://github.com/quartz-community/table-of-contents)
- Install: `npx quartz plugin add github:quartz-community/table-of-contents`
+5
View File
@@ -1,7 +1,12 @@
---
title: TagList
description: Renders tags as clickable links.
tags:
- plugin/component
image:
repository: "[quartz-community/tag-list](https://github.com/quartz-community/tag-list)"
enabled: false
required: false
---
This plugin renders the page's tags as a list of clickable links. Each tag links to its corresponding [[TagPage|tag page]], making it easy for readers to browse related content by topic.
+8 -1
View File
@@ -1,7 +1,12 @@
---
title: TagPage
description: Generates listing pages for tags.
tags:
- plugin/pageType
image:
repository: "[quartz-community/tag-page](https://github.com/quartz-community/tag-page)"
enabled: true
required: false
---
This plugin is a page type plugin that emits dedicated pages for each tag used in the content. It uses the `default` [[layout#Page Frames|page frame]] (three-column layout with sidebars). See [[folder and tag listings]] for more information.
@@ -11,7 +16,9 @@ This plugin is a page type plugin that emits dedicated pages for each tag used i
This plugin accepts the following configuration options:
- `sort`: A function of type `(f1: QuartzPluginData, f2: QuartzPluginData) => number{:ts}` used to sort entries. Defaults to sorting by date and tie-breaking on lexographical order.
- `numPages`: The maximum number of pages to display per tag before showing a "see more" link. Defaults to `10`.
- `sort`: A function of type `(f1: QuartzPluginData, f2: QuartzPluginData) => number{:ts}` used to sort entries. Defaults to sorting by date and tie-breaking on lexographical order. Requires a TS override.
- `prefixTags`: If `true`, generated tag page titles are prefixed with "Tag: " (e.g. "Tag: recipes"). Defaults to `false`.
## API
+68
View File
@@ -0,0 +1,68 @@
---
title: UnlistedPages
description: Hides pages from navigation and indexes while still publishing them.
tags:
- plugin/transformer
image:
new-in-v5: true
repository: "[quartz-community/unlisted-pages](https://github.com/quartz-community/unlisted-pages)"
enabled: true
required: false
---
Zero-config transformer that makes `unlisted: true` in a page's frontmatter a first-class way to opt out of every listing surface on your site. The page is still emitted as HTML and remains accessible by direct URL, but is absent from `contentIndex.json`, RSS, sitemap, graph, explorer, search, backlinks, recent notes, folder listings, and tag listings.
> [!note]
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
## Usage
Add an `unlisted` field to any page's frontmatter:
```yaml
---
title: My Draft
unlisted: true
---
```
That's it. Every Quartz v5 plugin that respects the `file.data.unlisted` convention will then hide the page.
## What each plugin does
| Plugin | Behavior when `unlisted: true` |
| -------------- | -------------------------------------------------------------------------- |
| `ContentIndex` | Page absent from `contentIndex.json`, `sitemap.xml`, and the RSS feed. |
| `Search` | Page absent from search results (derived from `contentIndex.json`). |
| `Graph` | Page absent from graph nodes and edges (derived from `contentIndex.json`). |
| `Explorer` | Page absent from the sidebar file tree (derived from `contentIndex.json`). |
| `Backlinks` | Page never appears as a backlink source on other pages. |
| `RecentNotes` | Page absent from the recent notes list. |
| `FolderPage` | Page absent from folder listings and folder discovery. |
| `TagPage` | Page absent from tag discovery and tag listings. |
In every case, the page's HTML is still emitted and accessible by direct URL.
## Configuration
Zero options. Just enable it.
```yaml title="quartz.config.yaml"
- source: github:quartz-community/unlisted-pages
enabled: true
```
## Interaction with [[EncryptedPages]]
The [[EncryptedPages]] plugin also sets `file.data.unlisted` when its `unlistWhenEncrypted: true` option is set or when a page has `unlisted: true` in frontmatter. The two plugins compose cleanly:
- If you install only `UnlistedPages`: any page with `unlisted: true` in frontmatter is hidden from listing surfaces. Encryption is independent.
- If you install only `EncryptedPages`: `unlisted: true` only takes effect on pages that are also encrypted (have a password). Non-encrypted pages with `unlisted: true` are silently ignored.
- If you install both: `unlisted: true` works for every page, encrypted or not. This is the recommended setup for sites that use encrypted pages.
## API
- Category: Transformer
- Function name: `ExternalPlugin.UnlistedPages()`.
- Source: [`quartz-community/unlisted-pages`](https://github.com/quartz-community/unlisted-pages)
- Install: `npx quartz plugin add github:quartz-community/unlisted-pages`
+121 -64
View File
@@ -1,5 +1,6 @@
---
title: Plugins
image:
---
Quartz's functionality is provided by a collection of first-party community plugins. Each plugin can be enabled, disabled, and configured via `quartz.config.yaml`. See [[configuration#Plugins|Configuration]] for details on how to manage plugins.
@@ -21,69 +22,125 @@ Quartz plugins fall into several categories:
## First-party plugins
### Transformers
```base
filters:
and:
- file.ext == "md"
- file.inFolder("plugins")
- "!file.name.startsWith('index')"
- "!file.name.contains('Demo')"
- "!file.name.contains('Static')"
- "!file.name.contains('Assets')"
- "!file.name.contains('ComponentResources')"
- "!file.name.contains('NotFoundPage')"
formulas:
category: |
if(file.hasTag("plugin/transformer"), "Transformer",
if(file.hasTag("plugin/filter"), "Filter",
if(file.hasTag("plugin/pageType"), "Page Type",
if(file.hasTag("plugin/emitter"), "Emitter",
if(file.hasTag("plugin/component"), "Component",
"Other")))))
properties:
title:
displayName: Plugin
repository:
displayName: Repository
enabled:
displayName: Enabled
required:
displayName: Required
description:
displayName: Description
views:
- type: table
name: All Plugins
groupBy:
property: formula.category
direction: ASC
order:
- title
- repository
- enabled
- required
- description
sort:
- property: formula.category
direction: ASC
- property: title
direction: ASC
- type: table
name: Transformers
filters:
and:
- file.hasTag("plugin/transformer")
order:
- title
- repository
- enabled
- required
- description
sort:
- property: title
direction: ASC
- type: table
name: Filters
filters:
and:
- file.hasTag("plugin/filter")
order:
- title
- repository
- enabled
- required
- description
sort:
- property: title
direction: ASC
- type: table
name: Page Types
filters:
and:
- file.hasTag("plugin/pageType")
order:
- title
- repository
- enabled
- required
- description
sort:
- property: title
direction: ASC
- type: table
name: Emitters
filters:
and:
- file.hasTag("plugin/emitter")
order:
- title
- repository
- enabled
- required
- description
sort:
- property: title
direction: ASC
- type: table
name: Components
filters:
and:
- file.hasTag("plugin/component")
order:
- title
- repository
- enabled
- required
- description
sort:
- property: title
direction: ASC
| Plugin | Repository | Enabled | Required | Description |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------- | :-----: | :------: | ---------------------------------------------------------- |
| [[Frontmatter\|Note Properties]] | [`quartz-community/note-properties`](https://github.com/quartz-community/note-properties) | ✅ | ✅ | Parses frontmatter and displays note properties. |
| [[CreatedModifiedDate]] | [`quartz-community/created-modified-date`](https://github.com/quartz-community/created-modified-date) | ✅ | ❌ | Determines creation and modification dates. |
| [[SyntaxHighlighting]] | [`quartz-community/syntax-highlighting`](https://github.com/quartz-community/syntax-highlighting) | ✅ | ❌ | Syntax highlighting for code blocks. |
| [[ObsidianFlavoredMarkdown]] | [`quartz-community/obsidian-flavored-markdown`](https://github.com/quartz-community/obsidian-flavored-markdown) | ✅ | ❌ | Obsidian-specific Markdown extensions. |
| [[GitHubFlavoredMarkdown]] | [`quartz-community/github-flavored-markdown`](https://github.com/quartz-community/github-flavored-markdown) | ✅ | ❌ | GitHub Flavored Markdown support. |
| [[TableOfContents]] | [`quartz-community/table-of-contents`](https://github.com/quartz-community/table-of-contents) | ✅ | ❌ | Generates table of contents data from headings. |
| [[CrawlLinks]] | [`quartz-community/crawl-links`](https://github.com/quartz-community/crawl-links) | ✅ | ⚠️ | Parses and resolves links. Removing it is not recommended. |
| [[Description]] | [`quartz-community/description`](https://github.com/quartz-community/description) | ✅ | ❌ | Generates page descriptions for metadata. |
| [[Latex]] | [`quartz-community/latex`](https://github.com/quartz-community/latex) | ✅ | ❌ | Renders LaTeX math expressions. |
| [[Citations]] | [`quartz-community/citations`](https://github.com/quartz-community/citations) | ❌ | ❌ | Academic citation support via BibTeX. |
| [[HardLineBreaks]] | [`quartz-community/hard-line-breaks`](https://github.com/quartz-community/hard-line-breaks) | ❌ | ❌ | Treats single newlines as hard line breaks. |
| [[OxHugoFlavoredMarkdown]] | [`quartz-community/ox-hugo`](https://github.com/quartz-community/ox-hugo) | ❌ | ❌ | ox-hugo Markdown compatibility. |
| [[RoamFlavoredMarkdown]] | [`quartz-community/roam`](https://github.com/quartz-community/roam) | ❌ | ❌ | Roam Research Markdown compatibility. |
```
### Filters
| Plugin | Repository | Enabled | Required | Description |
| ------------------- | ------------------------------------------------------------------------------------------- | :-----: | :------: | --------------------------------------- |
| [[RemoveDrafts]] | [`quartz-community/remove-draft`](https://github.com/quartz-community/remove-draft) | ✅ | ❌ | Filters out pages marked as drafts. |
| [[ExplicitPublish]] | [`quartz-community/explicit-publish`](https://github.com/quartz-community/explicit-publish) | ❌ | ❌ | Only publishes pages explicitly marked. |
### Page Types
| Plugin | Repository | Enabled | Required | Description |
| --------------- | ----------------------------------------------------------------------------------- | :-----: | :------: | ----------------------------------------------- |
| [[ContentPage]] | [`quartz-community/content-page`](https://github.com/quartz-community/content-page) | ✅ | ❌ | Generates HTML pages for Markdown content. |
| [[FolderPage]] | [`quartz-community/folder-page`](https://github.com/quartz-community/folder-page) | ✅ | ❌ | Generates folder listing pages. |
| [[TagPage]] | [`quartz-community/tag-page`](https://github.com/quartz-community/tag-page) | ✅ | ❌ | Generates tag listing pages. |
| [[CanvasPage]] | [`quartz-community/canvas-page`](https://github.com/quartz-community/canvas-page) | ✅ | ❌ | Renders JSON Canvas files as interactive pages. |
| [[BasesPage]] | [`quartz-community/bases-page`](https://github.com/quartz-community/bases-page) | ✅ | ❌ | Renders Obsidian Bases files as database views. |
### Emitters
| Plugin | Repository | Enabled | Required | Description |
| ---------------------------- | ----------------------------------------------------------------------------------------- | :-----: | :------: | ----------------------------------------------- |
| [[AliasRedirects]] | [`quartz-community/alias-redirects`](https://github.com/quartz-community/alias-redirects) | ✅ | ❌ | Generates redirect pages for aliases. |
| [[ContentIndex]] | [`quartz-community/content-index`](https://github.com/quartz-community/content-index) | ✅ | ❌ | Generates sitemap, RSS feed, and content index. |
| [[Favicon]] | [`quartz-community/favicon`](https://github.com/quartz-community/favicon) | ✅ | ❌ | Emits the site favicon. |
| [[CustomOgImages\|OG Image]] | [`quartz-community/og-image`](https://github.com/quartz-community/og-image) | ✅ | ❌ | Generates Open Graph social preview images. |
| [[CNAME]] | [`quartz-community/cname`](https://github.com/quartz-community/cname) | ✅ | ❌ | Emits a CNAME file for custom domains. |
### Components
| Plugin | Repository | Enabled | Required | Description |
| ------------------------------ | ----------------------------------------------------------------------------------------- | :-----: | :------: | ------------------------------------------- |
| [[ArticleTitle]] | [`quartz-community/article-title`](https://github.com/quartz-community/article-title) | ✅ | ❌ | Renders the article title as an h1 heading. |
| [[ContentMeta]] | [`quartz-community/content-meta`](https://github.com/quartz-community/content-meta) | ✅ | ❌ | Displays creation date and reading time. |
| [[TagList]] | [`quartz-community/tag-list`](https://github.com/quartz-community/tag-list) | ❌ | ❌ | Renders tags as clickable links. |
| [[PageTitle]] | [`quartz-community/page-title`](https://github.com/quartz-community/page-title) | ✅ | ❌ | Renders the site title as a home link. |
| [[darkmode\|Darkmode]] | [`quartz-community/darkmode`](https://github.com/quartz-community/darkmode) | ✅ | ❌ | Toggle between light and dark themes. |
| [[reader mode\|Reader Mode]] | [`quartz-community/reader-mode`](https://github.com/quartz-community/reader-mode) | ✅ | ❌ | Distraction-free reading mode toggle. |
| [[explorer\|Explorer]] | [`quartz-community/explorer`](https://github.com/quartz-community/explorer) | ✅ | ❌ | File tree explorer sidebar. |
| [[graph view\|Graph View]] | [`quartz-community/graph`](https://github.com/quartz-community/graph) | ✅ | ❌ | Interactive link graph visualization. |
| [[full-text search\|Search]] | [`quartz-community/search`](https://github.com/quartz-community/search) | ✅ | ❌ | Full-text search functionality. |
| [[backlinks\|Backlinks]] | [`quartz-community/backlinks`](https://github.com/quartz-community/backlinks) | ✅ | ❌ | Shows pages that link to the current page. |
| [[breadcrumbs\|Breadcrumbs]] | [`quartz-community/breadcrumbs`](https://github.com/quartz-community/breadcrumbs) | ✅ | ❌ | Breadcrumb navigation trail. |
| [[comments\|Comments]] | [`quartz-community/comments`](https://github.com/quartz-community/comments) | ❌ | ❌ | Comment system integration (Giscus, etc.). |
| [[Footer]] | [`quartz-community/footer`](https://github.com/quartz-community/footer) | ✅ | ❌ | Page footer with configurable links. |
| [[recent notes\|Recent Notes]] | [`quartz-community/recent-notes`](https://github.com/quartz-community/recent-notes) | ❌ | ❌ | Displays a list of recently modified notes. |
| [[Spacer]] | [`quartz-community/spacer`](https://github.com/quartz-community/spacer) | ✅ | ❌ | Flexible spacer for layout groups. |
| [[EncryptedPages]] | [`quartz-community/encrypted-pages`](https://github.com/quartz-community/encrypted-pages) | ✅ | ❌ | Password-protected encrypted pages. |
| [[StackedPages]] | [`quartz-community/stacked-pages`](https://github.com/quartz-community/stacked-pages) | ✅ | ❌ | Andy Matuschak-style stacked sliding panes. |
> [!note] Multi-category plugins
> Some plugins span multiple categories. **TableOfContents** is both a transformer and a component. **EncryptedPages** is a transformer, emitter, and component. They appear in each relevant category above.
+46 -2
View File
@@ -11,7 +11,7 @@ Common issues and solutions when working with Quartz.
This usually means a plugin is not installed. Run:
```bash
npx quartz plugin restore
npx quartz plugin install
```
This restores all plugins from your `quartz.lock.json` to `.quartz/plugins/`.
@@ -26,6 +26,8 @@ Try increasing concurrency:
```bash
npx quartz build --concurrency 8
# or the shorthand:
npx quartz build -c 8
```
The default uses all available CPU cores. If you're on a memory-constrained environment (CI), reducing concurrency may actually help.
@@ -37,7 +39,7 @@ The default uses all available CPU cores. If you're on a memory-constrained envi
1. Verify the plugin appears in `quartz.config.yaml` under `plugins:`
2. Check that `enabled: true` is set
3. Run `npx quartz plugin list` to confirm it's installed
4. Run `npx quartz plugin check` to verify plugin health
4. Run `npx quartz plugin install --latest --dry-run` to verify plugin health
### Plugin options not taking effect
@@ -60,6 +62,48 @@ This means the plugin is referenced in `quartz.ts` but not installed. Either:
- Install it: `npx quartz plugin add github:quartz-community/plugin-name`
- Or remove the reference from `quartz.ts`
### Plugins fail to build on a fresh clone
> [!important]
> Most community plugins now ship with a pre-built `dist/` directory and skip the build step entirely. The build failure scenario described below mainly applies to plugins in development or older plugins that haven't adopted pre-built distribution.
On a brand-new clone, `npx quartz plugin install` (or the plugin step run automatically by `npx quartz create`) may report a handful of plugins failing to build — typically around 10–15 of them. The git clone and checkout still succeed, but `npm run build` inside the plugin errors out.
This happens because `quartz.lock.json` pins each plugin to a specific commit, and those older plugin commits may have been authored against earlier versions of `@quartz-community/types` / `@quartz-community/utils` whose published artifacts are no longer shipped in the dependency's git repo. The plugin's `tsup`/`tsc` build then cannot resolve the expected type declarations.
Fix it by refreshing all plugins to the latest commit on their default branch:
```bash
npx quartz plugin install --latest
```
This rewrites `quartz.lock.json` with the newest commits (which in turn pin newer `@quartz-community/*` versions whose built output is available), and rebuilds every plugin from scratch. After this step, subsequent `npx quartz plugin install` calls will restore cleanly from the refreshed lockfile.
### `plugin install` hangs, OOMs, or fails on low-end hardware
> [!note]
> Pre-built plugins are much faster and lighter on resources because they skip the `npm install` and `npm run build` steps.
By default, `npx quartz plugin install` clones, fetches, and builds plugins in parallel across all your CPU cores. Each parallel worker may run its own `npm install` and `npm run build`, which is memory-intensive. On low-end laptops, Raspberry Pi, small VPS instances, or restrictive CI runners this can exhaust RAM, trigger the OOM killer, or make the system appear to hang.
Lower the parallelism with `--concurrency` / `-c`:
```bash
# Install one plugin at a time (safest, slowest)
npx quartz plugin install --latest -c 1
# Two at a time — usually works on 4 GB machines
npx quartz plugin install --latest --concurrency 2
```
The same flag works for `plugin add` and the deprecated aliases (`plugin update`, `plugin restore`, `plugin check`, `plugin resolve`):
```bash
npx quartz plugin add github:quartz-community/some-plugin -c 1
```
If `plugin install` consistently fails near the same plugin with `-c 1`, the issue is likely with that specific plugin's build, not with concurrency — try running `--verbose` to get detailed error output, and check the plugin's own repository for known issues.
## Content Issues
### Notes not showing up
+3154 -3855
View File
File diff suppressed because it is too large. Load diff
+48 -27
View File
@@ -41,52 +41,74 @@
"@floating-ui/dom": "^1.7.4",
"@myriaddreamin/rehype-typst": "^0.6.0",
"@napi-rs/simple-git": "0.1.22",
"@quartz-community/alias-redirects": "^0.1.0",
"@quartz-community/article-title": "^0.1.0",
"@quartz-community/backlinks": "^0.1.0",
"@quartz-community/bases-page": "^0.2.0",
"@quartz-community/breadcrumbs": "^0.1.0",
"@quartz-community/canvas-page": "^0.1.0",
"@quartz-community/citations": "^0.1.0",
"@quartz-community/cname": "^0.1.0",
"@quartz-community/comments": "^0.1.0",
"@quartz-community/content-index": "^0.1.0",
"@quartz-community/content-meta": "^0.1.0",
"@quartz-community/content-page": "^0.1.0",
"@quartz-community/crawl-links": "^0.1.0",
"@quartz-themes/core": "^1.0.0",
"@quartz-community/created-modified-date": "^0.1.0",
"@quartz-community/darkmode": "^0.1.0",
"@quartz-community/description": "^0.1.0",
"@quartz-community/encrypted-pages": "^0.1.0",
"@quartz-community/explicit-publish": "^0.1.0",
"@quartz-community/explorer": "^0.1.0",
"@quartz-community/favicon": "^0.1.1",
"@quartz-community/folder-page": "^0.1.0",
"@quartz-community/footer": "^0.1.0",
"@quartz-community/github-flavored-markdown": "^0.1.0",
"@quartz-community/graph": "^0.1.0",
"@quartz-community/hard-line-breaks": "^0.1.0",
"@quartz-community/latex": "^0.1.0",
"@quartz-community/note-properties": "^0.1.0",
"@quartz-community/obsidian-flavored-markdown": "^0.1.1",
"@quartz-community/og-image": "^0.1.1",
"@quartz-community/ox-hugo": "^0.1.0",
"@quartz-community/page-title": "^0.1.0",
"@quartz-community/quartz-fonts": "^0.1.1",
"@quartz-community/reader-mode": "^0.1.0",
"@quartz-community/recent-notes": "^0.1.0",
"@quartz-community/remove-draft": "^0.1.0",
"@quartz-community/roam": "^0.1.0",
"@quartz-community/search": "^0.1.0",
"@quartz-community/spacer": "^0.1.0",
"@quartz-community/stacked-pages": "^0.1.0",
"@quartz-community/syntax-highlighting": "^0.1.0",
"@quartz-community/table-of-contents": "^0.1.0",
"@quartz-community/tag-list": "^0.1.0",
"@quartz-community/tag-page": "^0.1.0",
"@quartz-community/unlisted-pages": "^0.1.0",
"ansi-truncate": "^1.4.0",
"async-mutex": "^0.5.0",
"chokidar": "^5.0.0",
"esbuild-sass-plugin": "^3.6.0",
"flexsearch": "^0.8.205",
"github-slugger": "^2.0.0",
"globby": "^16.1.0",
"gray-matter": "^4.0.3",
"hast-util-to-html": "^9.0.5",
"hast-util-from-html": "^2.0.0",
"hast-util-to-jsx-runtime": "^2.3.6",
"hast-util-to-string": "^3.0.1",
"is-absolute-url": "^5.0.0",
"isomorphic-git": "^1.36.3",
"js-yaml": "^4.1.1",
"lightningcss": "^1.31.1",
"mdast-util-find-and-replace": "^3.0.2",
"mdast-util-to-hast": "^13.2.1",
"mdast-util-to-string": "^4.0.0",
"micromorph": "^0.4.5",
"minimatch": "^10.1.1",
"preact": "^10.28.2",
"preact-render-to-string": "^6.6.5",
"pretty-bytes": "^7.1.0",
"pretty-time": "^1.1.0",
"reading-time": "^1.5.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-citation": "^2.3.1",
"rehype-katex": "^7.0.1",
"rehype-mathjax": "^7.1.0",
"rehype-pretty-code": "^0.14.1",
"rehype-raw": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-breaks": "^4.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.2",
"remark-smartypants": "^3.0.2",
"rfdc": "^1.4.1",
"satori": "^0.19.1",
"serve-handler": "^6.1.6",
"sharp": "^0.34.5",
"source-map-support": "^0.5.21",
"to-vfile": "^8.0.0",
"toml": "^3.0.0",
"unified": "^11.0.5",
"unist-util-visit": "^5.1.0",
"vfile": "^6.0.3",
@@ -96,10 +118,9 @@
"yargs": "^18.0.0"
},
"devDependencies": {
"@quartz-community/types": "github:quartz-community/types",
"@quartz-community/utils": "github:quartz-community/utils",
"@quartz-community/types": "^0.3.0",
"@quartz-community/utils": "^0.1.0",
"@types/hast": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^25.0.10",
"@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.10",
+64 -50
View File
@@ -12,7 +12,6 @@ configuration:
- private
- templates
- .obsidian
defaultDateType: modified
theme:
fontOrigin: googleFonts
cdnCaching: true
@@ -42,15 +41,16 @@ configuration:
highlight: rgba(143, 159, 169, 0.15)
textHighlight: "#b3aa0288"
plugins:
- source: github:quartz-community/created-modified-date
- source: "@quartz-community/created-modified-date"
enabled: true
options:
defaultDateType: modified
priority:
- frontmatter
- git
- filesystem
order: 10
- source: github:quartz-community/syntax-highlighting
- source: "@quartz-community/syntax-highlighting"
enabled: true
options:
theme:
@@ -58,79 +58,89 @@ plugins:
dark: github-dark
keepBackground: false
order: 20
- source: github:quartz-community/obsidian-flavored-markdown
- source: "@quartz-community/obsidian-flavored-markdown"
enabled: true
options:
enableInHtmlEmbed: false
enableCheckbox: true
order: 30
- source: github:quartz-community/github-flavored-markdown
- source: "@quartz-community/github-flavored-markdown"
enabled: true
order: 40
- source: github:quartz-community/table-of-contents
- source: "@quartz-community/table-of-contents"
enabled: true
order: 50
- source: github:quartz-community/crawl-links
layout:
position: right
priority: 30
- source: "@quartz-community/crawl-links"
enabled: true
options:
markdownLinkResolution: shortest
order: 60
- source: github:quartz-community/description
- source: "@quartz-community/description"
enabled: true
order: 70
- source: github:quartz-community/latex
- source: "@quartz-community/latex"
enabled: true
options:
renderEngine: katex
order: 80
- source: github:quartz-community/citations
- source: "@quartz-community/citations"
enabled: false
order: 85
- source: github:quartz-community/hard-line-breaks
- source: "@quartz-community/hard-line-breaks"
enabled: false
order: 90
- source: github:quartz-community/ox-hugo
- source: "@quartz-community/ox-hugo"
enabled: false
order: 91
- source: github:quartz-community/roam
- source: "@quartz-community/roam"
enabled: false
order: 92
- source: github:quartz-community/remove-draft
- source: "@quartz-community/quartz-fonts"
enabled: true
- source: github:quartz-community/explicit-publish
- source: "@quartz-themes/core"
enabled: false
- source: github:quartz-community/alias-redirects
options:
theme: tokyo-night
mode: both
- source: "@quartz-community/remove-draft"
enabled: true
- source: github:quartz-community/content-index
- source: "@quartz-community/explicit-publish"
enabled: false
- source: "@quartz-community/alias-redirects"
enabled: true
- source: "@quartz-community/content-index"
enabled: true
options:
enableSiteMap: true
enableRSS: true
- source: github:quartz-community/favicon
- source: "@quartz-community/favicon"
enabled: true
- source: github:quartz-community/og-image
- source: "@quartz-community/og-image"
enabled: true
- source: github:quartz-community/cname
- source: "@quartz-community/cname"
enabled: true
- source: github:quartz-community/canvas-page
- source: "@quartz-community/canvas-page"
enabled: true
- source: github:quartz-community/content-page
- source: "@quartz-community/content-page"
enabled: true
- source: github:quartz-community/folder-page
- source: "@quartz-community/folder-page"
enabled: true
- source: github:quartz-community/tag-page
- source: "@quartz-community/tag-page"
enabled: true
- source: github:quartz-community/explorer
- source: "@quartz-community/explorer"
enabled: true
layout:
position: left
priority: 50
- source: github:quartz-community/graph
- source: "@quartz-community/graph"
enabled: true
layout:
position: right
priority: 10
- source: github:quartz-community/search
- source: "@quartz-community/search"
enabled: true
layout:
position: left
@@ -138,50 +148,50 @@ plugins:
group: toolbar
groupOptions:
grow: true
- source: github:quartz-community/backlinks
- source: "@quartz-community/backlinks"
enabled: true
layout:
position: right
priority: 30
- source: github:quartz-community/article-title
priority: 50
- source: "@quartz-community/article-title"
enabled: true
layout:
position: beforeBody
priority: 10
- source: github:quartz-community/content-meta
- source: "@quartz-community/content-meta"
enabled: true
layout:
position: beforeBody
priority: 20
- source: github:quartz-community/tag-list
- source: "@quartz-community/tag-list"
enabled: false
layout:
position: beforeBody
priority: 30
- source: github:quartz-community/page-title
- source: "@quartz-community/page-title"
enabled: true
layout:
position: left
priority: 10
- source: github:quartz-community/darkmode
- source: "@quartz-community/darkmode"
enabled: true
layout:
position: left
priority: 30
group: toolbar
- source: github:quartz-community/reader-mode
- source: "@quartz-community/reader-mode"
enabled: true
layout:
position: left
priority: 35
group: toolbar
- source: github:quartz-community/breadcrumbs
- source: "@quartz-community/breadcrumbs"
enabled: true
layout:
position: beforeBody
priority: 5
condition: not-index
- source: github:quartz-community/comments
- source: "@quartz-community/comments"
enabled: false
options:
provider: giscus
@@ -189,15 +199,18 @@ plugins:
layout:
position: afterBody
priority: 10
- source: github:quartz-community/footer
- source: "@quartz-community/footer"
enabled: true
options:
links:
GitHub: https://github.com/jackyzha0/quartz
Discord Community: https://discord.gg/cRFFHYye7t
- source: github:quartz-community/recent-notes
layout:
position: footer
priority: 50
- source: "@quartz-community/recent-notes"
enabled: false
- source: github:quartz-community/spacer
- source: "@quartz-community/spacer"
enabled: true
options: {}
order: 25
@@ -205,11 +218,11 @@ plugins:
position: left
priority: 25
display: mobile-only
- source: github:quartz-community/bases-page
- source: "@quartz-community/bases-page"
enabled: true
options: {}
order: 50
- source: github:quartz-community/note-properties
- source: "@quartz-community/note-properties"
enabled: true
options:
includeAll: false
@@ -226,19 +239,20 @@ plugins:
position: beforeBody
priority: 15
display: all
- source: github:quartz-community/encrypted-pages
- source: "@quartz-community/unlisted-pages"
enabled: true
options: {}
order: 45
- source: "@quartz-community/encrypted-pages"
enabled: true
options:
visibility: icon
iterations: 600000
passwordField: password
unlistWhenEncrypted: false
outputPath: static/encryptedContentIndex.json
order: 900
layout:
position: body
priority: 100
display: all
- source: github:quartz-community/stacked-pages
enabled: true
- source: "@quartz-community/stacked-pages"
enabled: false
layout:
position: afterBody
priority: 50
-257
View File
@@ -1,257 +0,0 @@
{
"version": "1.0.0",
"plugins": {
"alias-redirects": {
"source": "github:quartz-community/alias-redirects",
"resolved": "https://github.com/quartz-community/alias-redirects.git",
"commit": "2913031a4989824754c0e550682a8d9c117ad569",
"installedAt": "2026-03-11T18:22:42.120Z"
},
"article-title": {
"source": "github:quartz-community/article-title",
"resolved": "https://github.com/quartz-community/article-title.git",
"commit": "6b57785696ab3fd187ba91b218e5fde67b8533ee",
"installedAt": "2026-03-11T18:23:01.116Z"
},
"backlinks": {
"source": "github:quartz-community/backlinks",
"resolved": "https://github.com/quartz-community/backlinks.git",
"commit": "c5f07804c9a050c4bf1d996454b1770a211d992b",
"installedAt": "2026-03-11T18:22:59.813Z"
},
"bases-page": {
"source": "github:quartz-community/bases-page",
"resolved": "https://github.com/quartz-community/bases-page.git",
"commit": "d6d81c5442d89c68bf4c1cffb9d84614f378c671",
"installedAt": "2026-03-12T19:33:22.237Z"
},
"breadcrumbs": {
"source": "github:quartz-community/breadcrumbs",
"resolved": "https://github.com/quartz-community/breadcrumbs.git",
"commit": "5687dccb6969be381407d8b8585846fe1f8f8913",
"installedAt": "2026-03-11T18:23:09.079Z"
},
"canvas-page": {
"source": "github:quartz-community/canvas-page",
"resolved": "https://github.com/quartz-community/canvas-page.git",
"commit": "227b4c0c9f6d2ed63d56cbab6174008c314bf5c7",
"installedAt": "2026-03-12T19:33:23.417Z"
},
"citations": {
"source": "github:quartz-community/citations",
"resolved": "https://github.com/quartz-community/citations.git",
"commit": "35f4c795f6a3a5763a7e5f283a13ed69a75cc8b1",
"installedAt": "2026-03-11T18:22:34.478Z"
},
"cname": {
"source": "github:quartz-community/cname",
"resolved": "https://github.com/quartz-community/cname.git",
"commit": "251249077b372809b78fb679135f81ca9d81d3a8",
"installedAt": "2026-03-11T18:22:47.432Z"
},
"comments": {
"source": "github:quartz-community/comments",
"resolved": "https://github.com/quartz-community/comments.git",
"commit": "8a76dfafc0742c1903212c4fc8e15f6fb5f9e99f",
"installedAt": "2026-03-12T19:33:25.149Z"
},
"content-index": {
"source": "github:quartz-community/content-index",
"resolved": "https://github.com/quartz-community/content-index.git",
"commit": "2a207bb2db52c57a89b673182e9f74280dd81ee3",
"installedAt": "2026-03-11T18:22:43.468Z"
},
"content-meta": {
"source": "github:quartz-community/content-meta",
"resolved": "https://github.com/quartz-community/content-meta.git",
"commit": "6381a7c2f7881640f845b13da7920e9c6524f219",
"installedAt": "2026-03-11T18:23:02.385Z"
},
"content-page": {
"source": "github:quartz-community/content-page",
"resolved": "https://github.com/quartz-community/content-page.git",
"commit": "b8a3f3bb6a126256b12f55879d144ba2ac104b73",
"installedAt": "2026-03-11T18:22:51.572Z"
},
"crawl-links": {
"source": "github:quartz-community/crawl-links",
"resolved": "https://github.com/quartz-community/crawl-links.git",
"commit": "5ccbcb5f3ac7b1c24fbcb34aa2454df06fe7031c",
"installedAt": "2026-03-11T18:22:30.563Z"
},
"created-modified-date": {
"source": "github:quartz-community/created-modified-date",
"resolved": "https://github.com/quartz-community/created-modified-date.git",
"commit": "330621e98824efc34bcc061365076a0e30607235",
"installedAt": "2026-03-11T18:22:23.768Z"
},
"darkmode": {
"source": "github:quartz-community/darkmode",
"resolved": "https://github.com/quartz-community/darkmode.git",
"commit": "672ad8da9899dadb5ec0e237864279541cde9d58",
"installedAt": "2026-03-12T19:33:28.700Z"
},
"description": {
"source": "github:quartz-community/description",
"resolved": "https://github.com/quartz-community/description.git",
"commit": "76f05fb1ddcc412660ff247bb7ed532e2730c641",
"installedAt": "2026-03-11T18:22:31.873Z"
},
"encrypted-pages": {
"source": "github:quartz-community/encrypted-pages",
"resolved": "https://github.com/quartz-community/encrypted-pages.git",
"commit": "4e26afa5b918f4399bea3028d5c250b987b44288",
"installedAt": "2026-03-12T19:33:29.813Z"
},
"explicit-publish": {
"source": "github:quartz-community/explicit-publish",
"resolved": "https://github.com/quartz-community/explicit-publish.git",
"commit": "e6d37f711a44a8a30ff76796b1670ca852aa3157",
"installedAt": "2026-03-11T18:22:40.759Z"
},
"explorer": {
"source": "github:quartz-community/explorer",
"resolved": "https://github.com/quartz-community/explorer.git",
"commit": "def459f31b02fdebdc22579cbeec2907829ff20f",
"installedAt": "2026-03-12T19:33:30.998Z"
},
"favicon": {
"source": "github:quartz-community/favicon",
"resolved": "https://github.com/quartz-community/favicon.git",
"commit": "c389697fee691553920d44bab16ee06e79d2e080",
"installedAt": "2026-03-11T18:22:44.822Z"
},
"folder-page": {
"source": "github:quartz-community/folder-page",
"resolved": "https://github.com/quartz-community/folder-page.git",
"commit": "0bb653d651626dece1e56fd7a08d3f2fb3a3cd8a",
"installedAt": "2026-03-11T18:22:52.983Z"
},
"footer": {
"source": "github:quartz-community/footer",
"resolved": "https://github.com/quartz-community/footer.git",
"commit": "f0fe3d6ca24624d955a4f4e62e5aafabe053f29e",
"installedAt": "2026-03-11T18:23:11.638Z"
},
"github-flavored-markdown": {
"source": "github:quartz-community/github-flavored-markdown",
"resolved": "https://github.com/quartz-community/github-flavored-markdown.git",
"commit": "628366ec62c1122da1eaef7c988d53bdaae3d19a",
"installedAt": "2026-03-11T18:22:27.866Z"
},
"graph": {
"source": "github:quartz-community/graph",
"resolved": "https://github.com/quartz-community/graph.git",
"commit": "701bda442cf08f521e88ec326b12a7559320eef4",
"installedAt": "2026-03-12T19:33:34.250Z"
},
"hard-line-breaks": {
"source": "github:quartz-community/hard-line-breaks",
"resolved": "https://github.com/quartz-community/hard-line-breaks.git",
"commit": "f8417e909a3c31d13463a6655c7ed903af3b34c5",
"installedAt": "2026-03-11T18:22:35.740Z"
},
"latex": {
"source": "github:quartz-community/latex",
"resolved": "https://github.com/quartz-community/latex.git",
"commit": "2544fd13fa132493647480d8ce75f4432a6f1750",
"installedAt": "2026-03-11T18:22:33.240Z"
},
"note-properties": {
"source": "github:quartz-community/note-properties",
"resolved": "https://github.com/quartz-community/note-properties.git",
"commit": "353531585033528eef9faa7eb2f27e377db7fa14",
"installedAt": "2026-03-12T19:33:36.033Z"
},
"obsidian-flavored-markdown": {
"source": "github:quartz-community/obsidian-flavored-markdown",
"resolved": "https://github.com/quartz-community/obsidian-flavored-markdown.git",
"commit": "eda74e79eac746445b7d6941f90133bf97483cd7",
"installedAt": "2026-03-12T19:33:36.619Z"
},
"og-image": {
"source": "github:quartz-community/og-image",
"resolved": "https://github.com/quartz-community/og-image.git",
"commit": "ab1f8e5ddcd3d9e9c55ea9f8f4163ae34cabe6ce",
"installedAt": "2026-03-11T18:22:46.168Z"
},
"ox-hugo": {
"source": "github:quartz-community/ox-hugo",
"resolved": "https://github.com/quartz-community/ox-hugo.git",
"commit": "5e7399d6bcdd8a4824aad764952eeb8177e45591",
"installedAt": "2026-03-11T18:22:37.014Z"
},
"page-title": {
"source": "github:quartz-community/page-title",
"resolved": "https://github.com/quartz-community/page-title.git",
"commit": "ad0e06a2fe2e2280217a445f167ee105edb8bde5",
"installedAt": "2026-03-11T18:23:05.089Z"
},
"reader-mode": {
"source": "github:quartz-community/reader-mode",
"resolved": "https://github.com/quartz-community/reader-mode.git",
"commit": "1da1254ac74fd71cd950ff77ac6421db89469e06",
"installedAt": "2026-03-12T19:33:38.972Z"
},
"recent-notes": {
"source": "github:quartz-community/recent-notes",
"resolved": "https://github.com/quartz-community/recent-notes.git",
"commit": "1220b39bec5a8d6178e4021cf87e42eeda2b5e39",
"installedAt": "2026-03-11T18:23:12.941Z"
},
"remove-draft": {
"source": "github:quartz-community/remove-draft",
"resolved": "https://github.com/quartz-community/remove-draft.git",
"commit": "c44b2a1314cfe8ac4d4450a566ec9a122daba5f2",
"installedAt": "2026-03-11T18:22:39.521Z"
},
"roam": {
"source": "github:quartz-community/roam",
"resolved": "https://github.com/quartz-community/roam.git",
"commit": "187f5d116ff13892a0012d608b8522eb3fecd028",
"installedAt": "2026-03-11T18:22:38.332Z"
},
"search": {
"source": "github:quartz-community/search",
"resolved": "https://github.com/quartz-community/search.git",
"commit": "e9c10e521b95a14a512739b62a4159ab5afd5edf",
"installedAt": "2026-03-12T19:33:41.367Z"
},
"spacer": {
"source": "github:quartz-community/spacer",
"resolved": "https://github.com/quartz-community/spacer.git",
"commit": "90e2f22e238ccccd5d2c38e6a236ccd2adbd9636",
"installedAt": "2026-03-11T18:23:14.251Z"
},
"stacked-pages": {
"source": "github:quartz-community/stacked-pages",
"resolved": "https://github.com/quartz-community/stacked-pages.git",
"commit": "2d853d361d84211adda38e2c86973e706f265f9b",
"installedAt": "2026-03-13T23:15:30.401Z"
},
"syntax-highlighting": {
"source": "github:quartz-community/syntax-highlighting",
"resolved": "https://github.com/quartz-community/syntax-highlighting.git",
"commit": "4593694be62ed55486d89b36f40a027a7b48233c",
"installedAt": "2026-03-12T19:33:42.554Z"
},
"table-of-contents": {
"source": "github:quartz-community/table-of-contents",
"resolved": "https://github.com/quartz-community/table-of-contents.git",
"commit": "70b12d85cb873ce42d95111ffb4d8092644c1763",
"installedAt": "2026-03-12T19:33:43.169Z"
},
"tag-list": {
"source": "github:quartz-community/tag-list",
"resolved": "https://github.com/quartz-community/tag-list.git",
"commit": "6014e0c4f688ece03a51674c98774fd9c021c3a1",
"installedAt": "2026-03-11T18:23:03.753Z"
},
"tag-page": {
"source": "github:quartz-community/tag-page",
"resolved": "https://github.com/quartz-community/tag-page.git",
"commit": "dd0cd223c433722b3eb3ff7c93eec8eec49f76b5",
"installedAt": "2026-03-11T18:22:54.300Z"
}
}
}
+179 -118
View File
@@ -1,38 +1,34 @@
#!/usr/bin/env -S node --no-deprecation
const [major] = process.versions.node.split(".").map(Number)
if (major < 22) {
console.error(
`\nQuartz requires Node.js >= 22, but you are running Node.js ${process.version}.\n` +
`Please upgrade: https://nodejs.org/\n`,
)
process.exit(1)
}
import yargs from "yargs"
import { hideBin } from "yargs/helpers"
import {
handleBuild,
handleCreate,
handleUpdate,
handleUpgrade,
handleRestore,
handleSync,
} from "./cli/handlers.js"
import { handleMigrate } from "./cli/migrate-handler.js"
import {
handlePluginInstall as handleGitPluginInstall,
handlePluginInstallUnified,
handlePluginAdd,
handlePluginRemove,
handlePluginUpdate,
handlePluginRestore,
handlePluginList,
handlePluginStatus,
handlePluginEnable,
handlePluginDisable,
handlePluginConfig,
handlePluginCheck,
handlePluginPrune,
handlePluginResolve,
} from "./cli/plugin-git-handlers.js"
import {
CommonArgv,
BuildArgv,
CreateArgv,
SyncArgv,
PluginInstallArgv,
PluginUninstallArgv,
PluginSearchArgv,
} from "./cli/args.js"
import { CommonArgv, BuildArgv, CreateArgv, SyncArgv } from "./cli/args.js"
import { version } from "./cli/constants.js"
async function launchTui() {
@@ -44,7 +40,7 @@ async function launchTui() {
if (!existsSync(tuiPath)) {
console.error(
"TUI plugin not installed. Install with:\n" +
" npx quartz plugin add github:quartz-community/tui\n",
" npx quartz plugin add @quartz-community/tui\n",
)
process.exit(1)
}
@@ -84,16 +80,13 @@ yargs(hideBin(process.argv))
await handleCreate(argv)
})
.command(
"update [names..]",
"Update installed plugins to latest version",
["upgrade", "update"],
"Upgrade Quartz to the latest version",
CommonArgv,
async (argv) => {
await handleUpdate(argv)
await handleUpgrade(argv)
},
)
.command("upgrade", "Upgrade Quartz to the latest version", CommonArgv, async (argv) => {
await handleUpgrade(argv)
})
.command(
"restore",
"Try to restore your content folder from the cache",
@@ -108,9 +101,6 @@ yargs(hideBin(process.argv))
.command("build", "Build Quartz into a bundle of static HTML files", BuildArgv, async (argv) => {
await handleBuild(argv)
})
.command("migrate", "Migrate old config to quartz.config.yaml", CommonArgv, async () => {
await handleMigrate()
})
.command("tui", "Launch interactive plugin manager", CommonArgv, async () => {
await launchTui()
})
@@ -118,106 +108,177 @@ yargs(hideBin(process.argv))
"plugin [subcommand]",
"Manage Quartz plugins",
(yargs) => {
return yargs
.command("install", "Install plugins from quartz.lock.json", CommonArgv, async () => {
await handleGitPluginInstall()
})
.command("add <repos..>", "Add plugins from Git repositories", CommonArgv, async (argv) => {
await handlePluginAdd(argv.repos)
})
.command("remove <names..>", "Remove installed plugins", CommonArgv, async (argv) => {
await handlePluginRemove(argv.names)
})
.command(
"update [names..]",
"Update installed plugins to latest version",
CommonArgv,
async (argv) => {
await handlePluginUpdate(argv.names)
},
)
.command("list", "List all installed plugins", CommonArgv, async () => {
await handlePluginList()
})
.command(
"restore",
"Restore plugins from lockfile (exact versions)",
CommonArgv,
async () => {
await handlePluginRestore()
},
)
.command(
"enable <names..>",
"Enable plugins in quartz.config.yaml",
CommonArgv,
async (argv) => {
await handlePluginEnable(argv.names)
},
)
.command(
"disable <names..>",
"Disable plugins in quartz.config.yaml",
CommonArgv,
async (argv) => {
await handlePluginDisable(argv.names)
},
)
.command(
"config <name>",
"View or set plugin configuration",
{
...CommonArgv,
set: {
string: true,
describe: "Set a config value (key=value)",
return (
yargs
.command(
"install [names..]",
"Install plugins from lockfile or config",
{
...CommonArgv,
"from-config": {
boolean: true,
default: false,
describe: "install plugins referenced in quartz.config.yaml instead of lockfile",
},
latest: {
boolean: true,
default: false,
describe: "fetch latest version from remote instead of pinned lockfile commit",
},
clean: {
boolean: true,
default: false,
describe: "skip plugins whose directory already exists",
},
"dry-run": {
boolean: true,
default: false,
describe: "show what would happen without making changes",
},
},
},
async (argv) => {
await handlePluginConfig(argv.name, { set: argv.set })
},
)
.command("check", "Check for plugin updates", CommonArgv, async () => {
await handlePluginCheck()
})
.command(
"prune",
"Remove installed plugins no longer referenced in config",
{
...CommonArgv,
"dry-run": {
boolean: true,
default: false,
describe: "show what would be pruned without making changes",
async (argv) => {
await handlePluginInstallUnified({
names: argv.names?.length ? argv.names : undefined,
fromConfig: argv.fromConfig,
latest: argv.latest,
clean: argv.clean,
dryRun: argv.dryRun,
concurrency: argv.concurrency,
})
},
},
async (argv) => {
await handlePluginPrune({ dryRun: argv.dryRun })
},
)
.command(
"resolve",
"Install plugins from config that are not yet in the lockfile",
{
...CommonArgv,
"dry-run": {
boolean: true,
default: false,
describe: "show what would be resolved without making changes",
)
.command(
"add <repos..>",
"Add plugins from Git repositories",
{
...CommonArgv,
name: {
string: true,
alias: ["as"],
describe: "Override the plugin name (for resolving conflicts with duplicate names)",
},
subdir: {
string: true,
describe: "Subdirectory within the repository containing the plugin",
},
},
},
async (argv) => {
await handlePluginResolve({ dryRun: argv.dryRun })
},
)
.demandCommand(0, "")
async (argv) => {
await handlePluginAdd(argv.repos, {
name: argv.name,
subdir: argv.subdir,
concurrency: argv.concurrency,
})
},
)
.command("remove <names..>", "Remove installed plugins", CommonArgv, async (argv) => {
await handlePluginRemove(argv.names)
})
.command("list", "List all installed plugins", CommonArgv, async () => {
await handlePluginList()
})
.command(
"enable <names..>",
"Enable plugins in quartz.config.yaml",
CommonArgv,
async (argv) => {
await handlePluginEnable(argv.names)
},
)
.command(
"disable <names..>",
"Disable plugins in quartz.config.yaml",
CommonArgv,
async (argv) => {
await handlePluginDisable(argv.names)
},
)
.command(
"config <name>",
"View or set plugin configuration",
{
...CommonArgv,
set: {
string: true,
describe: "Set a config value (key=value)",
},
},
async (argv) => {
await handlePluginConfig(argv.name, { set: argv.set })
},
)
.command(
"prune",
"Remove installed plugins no longer referenced in config",
{
...CommonArgv,
"dry-run": {
boolean: true,
default: false,
describe: "show what would be pruned without making changes",
},
},
async (argv) => {
await handlePluginPrune({ dryRun: argv.dryRun })
},
)
// Hidden deprecated aliases
.command("restore", false, CommonArgv, async (argv) => {
console.log(
"\x1b[33m⚠ 'plugin restore' is deprecated. Use 'plugin install --clean' instead.\x1b[0m",
)
await handlePluginInstallUnified({ clean: true, concurrency: argv.concurrency })
})
.command("update [names..]", false, CommonArgv, async (argv) => {
console.log(
"\x1b[33m⚠ 'plugin update' is deprecated. Use 'plugin install --latest' instead.\x1b[0m",
)
await handlePluginInstallUnified({
names: argv.names?.length ? argv.names : undefined,
latest: true,
concurrency: argv.concurrency,
})
})
.command("check", false, CommonArgv, async (argv) => {
console.log(
"\x1b[33m⚠ 'plugin check' is deprecated. Use 'plugin install --latest --dry-run' instead.\x1b[0m",
)
await handlePluginInstallUnified({
latest: true,
dryRun: true,
concurrency: argv.concurrency,
})
})
.command(
"resolve",
false,
{
...CommonArgv,
"dry-run": {
boolean: true,
default: false,
describe: "show what would be resolved without making changes",
},
},
async (argv) => {
console.log(
"\x1b[33m⚠ 'plugin resolve' is deprecated. Use 'plugin install --from-config' instead.\x1b[0m",
)
await handlePluginInstallUnified({
fromConfig: true,
dryRun: argv.dryRun,
concurrency: argv.concurrency,
})
},
)
.demandCommand(0, "")
)
},
async (argv) => {
if (!argv._.includes("plugin") || argv._.length > 1) return
await launchTui()
await handlePluginStatus()
},
)
.showHelpOnFail(false)
.showHelpOnFail(true)
.help()
.strict()
.demandCommand().argv
+149 -164
View File
@@ -9,7 +9,8 @@ import { parseMarkdown } from "./processors/parse"
import { filterContent } from "./processors/filter"
import { emitContent } from "./processors/emit"
import cfg from "../quartz"
import { FilePath, FullSlug, joinSegments, slugifyFilePath } from "./util/path"
import { FilePath, joinSegments, slugifyFilePath } from "./util/path"
import { detectSlugCollisions, formatCollisionWarning } from "./util/slugCollisions"
import chokidar from "chokidar"
import { ProcessedContent } from "./plugins/vfile"
import { Argv, BuildCtx } from "./util/ctx"
@@ -19,38 +20,13 @@ import { options } from "./util/sourcemap"
import { Mutex } from "async-mutex"
import { getStaticResourcesFromPlugins } from "./plugins"
import { randomIdNonSecure } from "./util/random"
import { ChangeEvent, QuartzPageTypePluginInstance } from "./plugins/types"
import { ChangeEvent } from "./plugins/types"
import { minimatch } from "minimatch"
function getPageTypeExtensions(ctx: BuildCtx): Set<string> {
const extensions = new Set<string>()
const pageTypes = (ctx.cfg.plugins.pageTypes ?? []) as unknown as QuartzPageTypePluginInstance[]
for (const pt of pageTypes) {
if (pt.fileExtensions) {
for (const ext of pt.fileExtensions) {
extensions.add(ext)
}
}
}
return extensions
}
// For files whose extensions are handled by PageType plugins (e.g. .canvas, .base),
// add extension-stripped slug aliases so that wikilink resolution (CrawlLinks) maps
// `![[file.canvas]]` to the virtual-page slug `file` instead of the raw `file.canvas`.
function addVirtualPageSlugAliases(allSlugs: FullSlug[], extensions: Set<string>): FullSlug[] {
const extra: FullSlug[] = []
for (const slug of allSlugs) {
for (const ext of extensions) {
if (slug.endsWith(ext)) {
const stripped = slug.slice(0, -ext.length) as FullSlug
if (!allSlugs.includes(stripped) && !extra.includes(stripped)) {
extra.push(stripped)
}
}
}
}
return extra
function reportSlugCollisions(content: ProcessedContent[]): void {
const collisions = detectSlugCollisions(content)
if (collisions.length === 0) return
console.warn(styleText("yellow", formatCollisionWarning(collisions)))
}
type ContentMap = Map<
@@ -114,15 +90,8 @@ async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
ctx.allFiles = allFiles
ctx.allSlugs = allFiles.map((fp) => slugifyFilePath(fp as FilePath))
// Add extension-stripped slug aliases for PageType-registered extensions
// so that wikilinks like ![[file.canvas]] resolve to virtual page slugs
const ptExtensions = getPageTypeExtensions(ctx)
if (ptExtensions.size > 0) {
const aliases = addVirtualPageSlugAliases(ctx.allSlugs, ptExtensions)
ctx.allSlugs.push(...aliases)
}
const parsedFiles = await parseMarkdown(ctx, filePaths)
reportSlugCollisions(parsedFiles)
const filteredContent = filterContent(ctx, parsedFiles)
await emitContent(ctx, filteredContent)
@@ -155,7 +124,12 @@ async function startWatching(
for (const content of initialContent) {
const [_tree, vfile] = content
contentMap.set(vfile.data.relativePath!, {
const relPath = vfile.data.relativePath
if (!relPath) {
console.warn(`Skipping file with no relativePath: ${vfile.path}`)
continue
}
contentMap.set(relPath, {
type: "markdown",
content,
})
@@ -191,24 +165,34 @@ async function startWatching(
})
const changes: ChangeEvent[] = []
let rebuildTimeout: ReturnType<typeof setTimeout> | null = null
const scheduleRebuild = () => {
if (rebuildTimeout) clearTimeout(rebuildTimeout)
rebuildTimeout = setTimeout(() => {
rebuildTimeout = null
rebuild(changes, clientRefresh, buildData).catch((err) => {
console.error(styleText("red", "Rebuild failed:"), err.message ?? err)
})
}, 100)
}
watcher
.on("add", (fp) => {
fp = toPosixPath(fp)
if (buildData.ignored(fp)) return
changes.push({ path: fp as FilePath, type: "add" })
void rebuild(changes, clientRefresh, buildData)
scheduleRebuild()
})
.on("change", (fp) => {
fp = toPosixPath(fp)
if (buildData.ignored(fp)) return
changes.push({ path: fp as FilePath, type: "change" })
void rebuild(changes, clientRefresh, buildData)
scheduleRebuild()
})
.on("unlink", (fp) => {
fp = toPosixPath(fp)
if (buildData.ignored(fp)) return
changes.push({ path: fp as FilePath, type: "delete" })
void rebuild(changes, clientRefresh, buildData)
scheduleRebuild()
})
return async () => {
@@ -225,154 +209,155 @@ async function rebuild(changes: ChangeEvent[], clientRefresh: () => void, buildD
buildData.lastBuildMs = new Date().getTime()
const numChangesInBuild = changes.length
const release = await mut.acquire()
// if there's another build after us, release and let them do it
if (ctx.buildId !== buildId) {
release()
return
}
const perf = new PerfTimer()
perf.addEvent("rebuild")
console.log(styleText("yellow", "Detected change, rebuilding..."))
// update changesSinceLastBuild
for (const change of changes) {
changesSinceLastBuild[change.path] = change.type
}
const staticResources = getStaticResourcesFromPlugins(ctx)
const pathsToParse: FilePath[] = []
for (const [fp, type] of Object.entries(changesSinceLastBuild)) {
if (type === "delete" || path.extname(fp) !== ".md") continue
const fullPath = joinSegments(argv.directory, toPosixPath(fp)) as FilePath
pathsToParse.push(fullPath)
}
const parsed = await parseMarkdown(ctx, pathsToParse)
for (const content of parsed) {
contentMap.set(content[1].data.relativePath!, {
type: "markdown",
content,
})
}
// update state using changesSinceLastBuild
// we do this weird play of add => compute change events => remove
// so that partialEmitters can do appropriate cleanup based on the content of deleted files
for (const [file, change] of Object.entries(changesSinceLastBuild)) {
if (change === "delete") {
// universal delete case
contentMap.delete(file as FilePath)
try {
// if there's another build after us, release and let them do it
if (ctx.buildId !== buildId) {
return
}
// manually track non-markdown files as processed files only
// contains markdown files
if (change === "add" && path.extname(file) !== ".md") {
contentMap.set(file as FilePath, {
type: "other",
const perf = new PerfTimer()
perf.addEvent("rebuild")
console.log(styleText("yellow", "Detected change, rebuilding..."))
// update changesSinceLastBuild
for (const change of changes) {
changesSinceLastBuild[change.path] = change.type
}
const staticResources = getStaticResourcesFromPlugins(ctx)
const pathsToParse: FilePath[] = []
for (const [fp, type] of Object.entries(changesSinceLastBuild)) {
if (type === "delete" || path.extname(fp) !== ".md") continue
const fullPath = joinSegments(argv.directory, toPosixPath(fp)) as FilePath
pathsToParse.push(fullPath)
}
const parsed = await parseMarkdown(ctx, pathsToParse)
for (const content of parsed) {
const relPath = content[1].data.relativePath
if (!relPath) {
console.warn(`Skipping file with no relativePath: ${content[1].path}`)
continue
}
contentMap.set(relPath, {
type: "markdown",
content,
})
}
}
const changeEvents: ChangeEvent[] = Object.entries(changesSinceLastBuild).map(([fp, type]) => {
const path = fp as FilePath
const processedContent = contentMap.get(path)
if (processedContent?.type === "markdown") {
const [_tree, file] = processedContent.content
// update state using changesSinceLastBuild
// we do this weird play of add => compute change events => remove
// so that partialEmitters can do appropriate cleanup based on the content of deleted files
for (const [file, change] of Object.entries(changesSinceLastBuild)) {
if (change === "delete") {
// universal delete case
contentMap.delete(file as FilePath)
}
// manually track non-markdown files as processed files only
// contains markdown files
if (change === "add" && path.extname(file) !== ".md") {
contentMap.set(file as FilePath, {
type: "other",
})
}
}
const changeEvents: ChangeEvent[] = Object.entries(changesSinceLastBuild).map(([fp, type]) => {
const path = fp as FilePath
const processedContent = contentMap.get(path)
if (processedContent?.type === "markdown") {
const [_tree, file] = processedContent.content
return {
type,
path,
file,
}
}
return {
type,
path,
file,
}
})
// update allFiles and then allSlugs with the consistent view of content map
ctx.allFiles = Array.from(contentMap.keys())
ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath))
const markdownContent = Array.from(contentMap.values())
.filter((file) => file.type === "markdown")
.map((file) => file.content)
reportSlugCollisions(markdownContent)
let processedFiles = filterContent(ctx, markdownContent)
let emittedFiles = 0
// Phase 1: Run PageTypeDispatcher first so it populates ctx.virtualPages
const dispatcher = cfg.plugins.emitters.find((e) => e.name === "PageTypeDispatcher")
if (dispatcher) {
ctx.virtualPages = []
const emitFn = dispatcher.partialEmit ?? dispatcher.emit
const emitted = await emitFn(ctx, processedFiles, staticResources, changeEvents)
if (emitted !== null) {
if (Symbol.asyncIterator in emitted) {
for await (const file of emitted) {
emittedFiles++
if (ctx.argv.verbose) {
console.log(`[emit:${dispatcher.name}] ${file}`)
}
}
} else {
emittedFiles += emitted.length
if (ctx.argv.verbose) {
for (const file of emitted) {
console.log(`[emit:${dispatcher.name}] ${file}`)
}
}
}
}
}
return {
type,
path,
}
})
// Phase 2: Run all other emitters with content extended by virtual pages
const contentWithVirtual =
ctx.virtualPages.length > 0 ? [...processedFiles, ...ctx.virtualPages] : processedFiles
for (const emitter of cfg.plugins.emitters) {
if (emitter.name === "PageTypeDispatcher") continue
// Try to use partialEmit if available, otherwise assume the output is static
const emitFn = emitter.partialEmit ?? emitter.emit
const emitted = await emitFn(ctx, contentWithVirtual, staticResources, changeEvents)
if (emitted === null) {
continue
}
// update allFiles and then allSlugs with the consistent view of content map
ctx.allFiles = Array.from(contentMap.keys())
ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath))
// Add extension-stripped slug aliases for PageType-registered extensions
const ptExtensions = getPageTypeExtensions(ctx)
if (ptExtensions.size > 0) {
const aliases = addVirtualPageSlugAliases(ctx.allSlugs, ptExtensions)
ctx.allSlugs.push(...aliases)
}
let processedFiles = filterContent(
ctx,
Array.from(contentMap.values())
.filter((file) => file.type === "markdown")
.map((file) => file.content),
)
let emittedFiles = 0
// Phase 1: Run PageTypeDispatcher first so it populates ctx.virtualPages
const dispatcher = cfg.plugins.emitters.find((e) => e.name === "PageTypeDispatcher")
if (dispatcher) {
ctx.virtualPages = []
const emitFn = dispatcher.partialEmit ?? dispatcher.emit
const emitted = await emitFn(ctx, processedFiles, staticResources, changeEvents)
if (emitted !== null) {
if (Symbol.asyncIterator in emitted) {
// Async generator case
for await (const file of emitted) {
emittedFiles++
if (ctx.argv.verbose) {
console.log(`[emit:${dispatcher.name}] ${file}`)
console.log(`[emit:${emitter.name}] ${file}`)
}
}
} else {
// Array case
emittedFiles += emitted.length
if (ctx.argv.verbose) {
for (const file of emitted) {
console.log(`[emit:${dispatcher.name}] ${file}`)
console.log(`[emit:${emitter.name}] ${file}`)
}
}
}
}
console.log(
`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince("rebuild")}`,
)
console.log(styleText("green", `Done rebuilding in ${perf.timeSince()}`))
changes.splice(0, numChangesInBuild)
clientRefresh()
} finally {
release()
}
// Phase 2: Run all other emitters with content extended by virtual pages
const contentWithVirtual =
ctx.virtualPages.length > 0 ? [...processedFiles, ...ctx.virtualPages] : processedFiles
for (const emitter of cfg.plugins.emitters) {
if (emitter.name === "PageTypeDispatcher") continue
// Try to use partialEmit if available, otherwise assume the output is static
const emitFn = emitter.partialEmit ?? emitter.emit
const emitted = await emitFn(ctx, contentWithVirtual, staticResources, changeEvents)
if (emitted === null) {
continue
}
if (Symbol.asyncIterator in emitted) {
// Async generator case
for await (const file of emitted) {
emittedFiles++
if (ctx.argv.verbose) {
console.log(`[emit:${emitter.name}] ${file}`)
}
}
} else {
// Array case
emittedFiles += emitted.length
if (ctx.argv.verbose) {
for (const file of emitted) {
console.log(`[emit:${emitter.name}] ${file}`)
}
}
}
}
console.log(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince("rebuild")}`)
console.log(styleText("green", `Done rebuilding in ${perf.timeSince()}`))
changes.splice(0, numChangesInBuild)
clientRefresh()
release()
}
export default async (argv: Argv, mut: Mutex, clientRefresh: () => void) => {
+1 -4
View File
@@ -1,4 +1,3 @@
import { ValidDateType } from "./components/Date"
import { QuartzComponent } from "./components/types"
import { ValidLocale } from "./i18n"
import { PluginSpecifier } from "./plugins/loader/types"
@@ -68,8 +67,6 @@ export interface GlobalConfiguration {
analytics: Analytics
/** Glob patterns to not search */
ignorePatterns: string[]
/** Whether to use created, modified, or published as the default type of date */
defaultDateType: ValidDateType
/** Base URL to use for CNAME files, sitemaps, and RSS feeds that require an absolute URL.
* Quartz will avoid using this as much as possible and use relative URLs most of the time
*/
@@ -100,7 +97,7 @@ export interface FullPageLayout {
afterBody: QuartzComponent[]
left: QuartzComponent[]
right: QuartzComponent[]
footer: QuartzComponent
footer: QuartzComponent[]
/** Page frame name (e.g. "default", "full-width", "minimal"). Defaults to "default". */
frame?: string
}
+5 -31
View File
@@ -11,6 +11,11 @@ export const CommonArgv = {
default: false,
describe: "print out extra logging information",
},
concurrency: {
number: true,
alias: ["c"],
describe: "max parallel operations (default: number of CPU cores)",
},
}
export const CreateArgv = {
@@ -112,35 +117,4 @@ export const BuildArgv = {
default: false,
describe: "show detailed bundle information",
},
concurrency: {
number: true,
describe: "how many threads to use to parse notes",
},
}
export const PluginInstallArgv = {
...CommonArgv,
_: {
type: "string",
demandOption: true,
describe: "package names to install",
},
}
export const PluginUninstallArgv = {
...CommonArgv,
_: {
type: "string",
demandOption: true,
describe: "package names to uninstall",
},
}
export const PluginSearchArgv = {
...CommonArgv,
query: {
string: true,
alias: ["q"],
describe: "search query for plugins",
},
}
Loaded 100 of 155 files, more files were not shown because too many files have changed in this diff. Show more