mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-27 22:14:40 +01:00
Compare commits
211
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce1b5d4d89 | ||
|
|
e02d690957 | ||
|
|
5d94a93a03 | ||
|
|
9a4beb1747 | ||
|
|
c03c643a7c | ||
|
|
74d06afca0 | ||
|
|
f285e12ff9 | ||
|
|
6729a1e7bb | ||
|
|
37a61cfc08 | ||
|
|
45ed91c90c | ||
|
|
9909b508e7 | ||
|
|
bd3ac11469 | ||
|
|
92fa358ef1 | ||
|
|
ae8049d0fa | ||
|
|
e42cdf469d | ||
|
|
747d10ce3a | ||
|
|
2635c6080a | ||
|
|
149c82f1da | ||
|
|
f47668e024 | ||
|
|
29be20f41c | ||
|
|
f7b41e7bbf | ||
|
|
7c24cc66e1 | ||
|
|
3df0062b6f | ||
|
|
beca3bc26d | ||
|
|
0e16919455 | ||
|
|
81b358224b | ||
|
|
0346dc6149 | ||
|
|
e0f1e03913 | ||
|
|
c79adab53b | ||
|
|
af36801547 | ||
|
|
b1fc7acd8e | ||
|
|
011c101cd3 | ||
|
|
690f7a0325 | ||
|
|
abfda7b85e | ||
|
|
f646ffe97d | ||
|
|
61b06fa295 | ||
|
|
39520c2aca | ||
|
|
842712113b | ||
|
|
8be4d8eadc | ||
|
|
7b4da1cbcc | ||
|
|
b2241c313e | ||
|
|
bc0e3937c3 | ||
|
|
9de19e3027 | ||
|
|
a51b7df1ce | ||
|
|
2b061ab9de | ||
|
|
0d05ef72d8 | ||
|
|
e07aad698d | ||
|
|
dd667ee315 | ||
|
|
673a596cf8 | ||
|
|
57cd6631d3 | ||
|
|
623e710fe8 | ||
|
|
8c612458cd | ||
|
|
1c48865b9f | ||
|
|
c608817610 | ||
|
|
2bea104934 | ||
|
|
5071ecd403 | ||
|
|
51c13bcca4 | ||
|
|
01f8f963ea | ||
|
|
11334aa029 | ||
|
|
c2293500d7 | ||
|
|
4172d3f56c | ||
|
|
09a6b0336a | ||
|
|
415af8a52d | ||
|
|
6ce31a4814 | ||
|
|
df11e31ef3 | ||
|
|
734e1b8531 | ||
|
|
b25eba0dca | ||
|
|
465d0e03eb | ||
|
|
3a1dc46aab | ||
|
|
d5dad620d8 | ||
|
|
661b56afc3 | ||
|
|
2209ee6d7d | ||
|
|
caec7d24ee | ||
|
|
773e2c7fe1 | ||
|
|
96fc9c1bfb | ||
|
|
7ef986a16b | ||
|
|
a5b07e3c48 | ||
|
|
c97a377b84 | ||
|
|
52af9f1a29 | ||
|
|
093d233d2c | ||
|
|
a55f25f185 | ||
|
|
050586dc14 | ||
|
|
0cfcfc868b | ||
|
|
2f2c35d64c | ||
|
|
fb6464ef68 | ||
|
|
dc10654108 | ||
|
|
c33b6cfc48 | ||
|
|
3ab4503fe0 | ||
|
|
799b8e370f | ||
|
|
9d6cdba8e4 | ||
|
|
71454c77b6 | ||
|
|
8417bdc03f | ||
|
|
db7484e05e | ||
|
|
52f7895ea6 | ||
|
|
0bab8ea1bb | ||
|
|
282ef789b6 | ||
|
|
c97c545f0c | ||
|
|
e85dceaf23 | ||
|
|
7ce0665400 | ||
|
|
cc22cfe413 | ||
|
|
ed5912a53b | ||
|
|
43e2eb9e11 | ||
|
|
cfa0413736 | ||
|
|
a96d993bf5 | ||
|
|
09c0e5203d | ||
|
|
d70ab4e164 | ||
|
|
fd744c0a9e | ||
|
|
d9566ec223 | ||
|
|
72097c86e4 | ||
|
|
9c172ca3a4 | ||
|
|
39ecd2a76d | ||
|
|
a9b4be1046 | ||
|
|
b7316ae8fa | ||
|
|
d77bc173d3 | ||
|
|
488da675e7 | ||
|
|
16bc33e9fb | ||
|
|
33acb1c716 | ||
|
|
6f689dcdb9 | ||
|
|
4679f825fd | ||
|
|
05b5082388 | ||
|
|
c4d02241d5 | ||
|
|
8ce7599280 | ||
|
|
edd97cc665 | ||
|
|
fd8256e4a0 | ||
|
|
fd1e5eb8bf | ||
|
|
7c3df898ed | ||
|
|
5bec47ee54 | ||
|
|
ea2b3485bf | ||
|
|
857de3b2bc | ||
|
|
df13ac29e5 | ||
|
|
3b78d1658d | ||
|
|
c568c93fa0 | ||
|
|
dfd1d6bd67 | ||
|
|
b4d73585f7 | ||
|
|
723759f931 | ||
|
|
f5773b611f | ||
|
|
7714325740 | ||
|
|
4036e25a77 | ||
|
|
c770681ba8 | ||
|
|
55311cb0bc | ||
|
|
cc253bea53 | ||
|
|
2386362d57 | ||
|
|
d533468802 | ||
|
|
048519774a | ||
|
|
ee1cdffd0d | ||
|
|
08fddad0e8 | ||
|
|
506a7caa8c | ||
|
|
678398d235 | ||
|
|
6f82d03fd4 | ||
|
|
95e96b4871 | ||
|
|
23b70cdba0 | ||
|
|
829bec461f | ||
|
|
c392e177a7 | ||
|
|
3f8104fb50 | ||
|
|
7531e678f5 | ||
|
|
568004496b | ||
|
|
d80bb003f1 | ||
|
|
6f79e008e2 | ||
|
|
166d09b876 | ||
|
|
3960252445 | ||
|
|
436cce7610 | ||
|
|
4ed26b3943 | ||
|
|
8f469ed237 | ||
|
|
cdc5a0297f | ||
|
|
1dfe7fcdb0 | ||
|
|
7453f7f0d0 | ||
|
|
9c46b01c57 | ||
|
|
842a293ab1 | ||
|
|
6f872d4302 | ||
|
|
8578f2fdb2 | ||
|
|
5b863b0752 | ||
|
|
d092a3179b | ||
|
|
dacfeba928 | ||
|
|
5fafbf37b7 | ||
|
|
2e4ef40bc0 | ||
|
|
99685cf741 | ||
|
|
b58a7f20fe | ||
|
|
49d05638f2 | ||
|
|
d7d6c7b17f | ||
|
|
db2ce262b7 | ||
|
|
29a5bdf4b9 | ||
|
|
97059690a0 | ||
|
|
e2e248b9b8 | ||
|
|
9a04652b4f | ||
|
|
b19cdb8a09 | ||
|
|
ed4f6537e0 | ||
|
|
64dde0cb9c | ||
|
|
d8e2c7fb43 | ||
|
|
61329d2f74 | ||
|
|
ffc6e36ee9 | ||
|
|
46312a6197 | ||
|
|
607ccb8561 | ||
|
|
2fda5546dc | ||
|
|
006b75e4b0 | ||
|
|
e342ec5943 | ||
|
|
6a9d08ae1a | ||
|
|
f690faad9e | ||
|
|
546703340e | ||
|
|
7cfb079616 | ||
|
|
bdc1c71f65 | ||
|
|
beeeed45b8 | ||
|
|
0ab525ce4d | ||
|
|
2ec28ddd04 | ||
|
|
da4fb9bb7b | ||
|
|
b84c323224 | ||
|
|
ba5a9a6ce0 | ||
|
|
08e9470577 | ||
|
|
f520811260 | ||
|
|
7e45c5489e | ||
|
|
922bb80cb6 | ||
|
|
7236249485 |
No files matched your search
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
A page type's `generate` can be async: it may return a promise of its virtual pages, which Quartz awaits in full and incremental builds. Page types that create pages from other files (like `.mdx`) can now run content through the site's transformers or bundle with esbuild; previously a promise crashed the build with "virtualPages is not iterable" (#2575).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Clearer failures: errors thrown by a plugin now name the plugin (package, version, source), what it was doing (transforming, filtering, emitting, rendering a component) and the file or page, list problems Quartz already knew about that plugin (incompatible Quartz version, missing required data), and say how to check and where to report it. Plugin stack frames are no longer hidden. Warnings from loading the config are repeated in a summary at the end of the build, together with a note about links to pages that are not on the site (including links to drafts).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Frontmatter parsing, link resolution, draft handling and the content index are now built into Quartz (configured under `configuration.frontmatter`, `.links`, `.drafts` and `.contentIndex`) instead of being plugins that silently broke the site when disabled. Existing `crawl-links`, `remove-draft` and `content-index` entries keep working and are applied automatically; `npx quartz plugin doctor --fix` moves them into `configuration`. Plugins can add fields to `contentIndex.json` with an `extendContentIndex` hook, and emitters can reuse the built index via `ctx.contentIndex`. The effective built-in settings are available to plugins as `ctx.cfg.configuration.<key>`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
A plugin that lists a plugin now built into Quartz in `quartz.dependencies` (`@quartz-community/crawl-links`, `remove-draft` or `content-index`) no longer fails the build with "requires crawl-links. Run: npx quartz plugin add …". The built-in (`configuration.links`, `drafts`, `contentIndex`) satisfies the dependency. A warning is shown when that built-in is disabled. `npx quartz plugin doctor` checks the same way.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
More build errors caused by content are reported as content problems ("fix the file and build again") instead of "This is likely a Quartz bug": frontmatter that holds a single value or a list instead of properties, Markdown files and assets Quartz can't read (permission denied, a directory named like a note). Plugins can do the same by throwing an `Error` with `quartzContent = true` (see "Reporting problems in content" in Making plugins).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Plugins can declare `window.quartzStaticUrl` and `window.quartzPrefetch` in `capabilities.requires.globals` without a false "nothing provides it" warning: Quartz counts both as its own (`quartzPrefetch` unless `prefetch` is off).
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
A plugin that depends on a plugin of another pipeline stage (an emitter or component on a transformer) no longer fails the build because of their `order`: order is checked only between plugins of the same stage.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
A plugin whose dependency is configured but disabled gets the intended warning ("depends on X which is disabled") instead of failing the build with "requires X. Run: npx quartz plugin add X".
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
When a build stops on an error, Quartz stops esbuild before exiting. esbuild runs as a child process that writes to the same terminal; left running, it could print "fatal error: all goroutines are asleep - deadlock!" and a long goroutine dump after Quartz's error message.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
The folder hierarchy used by folder pages and breadcrumbs now includes the pages of page types that render files (`.base`, `.canvas`, …): folder pages list them, and a folder that holds only such pages has its own node (#2576). Documented that while a page type's `generate` runs, `ctx.virtualPages` holds the virtual pages of the page types before it.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
French: "Vue graphique" and "Table des matières" use French capitalisation (jackyzha0/quartz#2513).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Embedding a section by the anchor Obsidian writes for its heading works when that anchor differs from the heading's id: `![[note#Colon unspaced]]` now embeds `## Colon:unspaced`. It needs GitHubFlavoredMarkdown 2.1.0 or later, which marks those anchors on the heading.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Layout fixes: the `has-backlinks` condition works, `byPageType.exclude` matches npm plugin sources, layout overrides in `quartz.ts` are applied, `position: footer` is accepted by the config schema, and typos in positions, display values, frames or page types produce a "did you mean" warning instead of silently dropping the component. `quartz build --verbose` prints a layout report.
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Links as in Obsidian 1.15.0:
|
||||
|
||||
- A Markdown link whose path is not valid percent-encoding (`[x](%zz)`, `[x](a%E2.md)`) is an external link. Before, it failed the whole build with `URI malformed`.
|
||||
- Link paths are NFC-normalized, so a link spelled with a decomposed `é` reaches `café.md`.
|
||||
- An image of a file the site doesn't have, with no alt text, gets its percent-decoded path as alt (`` → “missing pic.png”), as Obsidian names a missing embed.
|
||||
- A wikilink's `^id` no longer names its paragraph (Obsidian Flavored Markdown).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Security updates: `sharp` 0.35.5 (GHSA-wq5f-xc86-pv6w), `toml` 5 (prototype pollution and DoS advisories; TOML frontmatter parses the same, and now also accepts plain dates like `date = 2024-01-02`) and `minimatch` 11 (GHSA-g3hv-75wg-m249; `ignorePatterns` match the same). The plugin schema's `layout.position` lists exactly the positions Quartz renders. `npx quartz tui` points to the right install command (`github:quartz-community/tui`).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Pages no longer scroll sideways on phones: long words (a page title such as "ObsidianFlavoredMarkdown", long inline code) break where they don't fit, and the right sidebar's components (graph, backlinks) wrap below each other when they don't fit side by side.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Security: frontmatter can no longer run code during a build. A note starting with `---js` or `---javascript` had its frontmatter evaluated as JavaScript (gray-matter's default engine), so building content you didn't write, such as a pull request preview, could run arbitrary code. Quartz now refuses JavaScript frontmatter with an error naming the file. Invalid frontmatter (for example broken YAML) is now reported as a problem in that file instead of as a Quartz bug.
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Markdown renders as it does in Obsidian: Quartz now uses ObsidianFlavoredMarkdown 2.0 and GitHubFlavoredMarkdown 2.0.
|
||||
|
||||
- **Line breaks changed:** a single line break inside a paragraph now renders as `<br>`, as in Obsidian's default reading view. Set `strictLineBreaks: true` in the ObsidianFlavoredMarkdown options to keep the previous behaviour (a space).
|
||||
- ObsidianFlavoredMarkdown parses with Obsidian's own parser by default (`preset: "legacy"`). Use `preset: "strict"` for TOML (`+++`) frontmatter or plugins that add their own Markdown syntax.
|
||||
- Also new: callouts parsed like Obsidian, inline footnotes (`text^[note]`), image sizes on Markdown images (``), Mermaid diagrams that follow the theme's colours, an opt-in Pele diagram renderer, and inline tags that only link to tag pages that exist.
|
||||
- GitHubFlavoredMarkdown now runs before ObsidianFlavoredMarkdown (order 30, then 40), as in the default config. If your config sets `order` for either plugin, keep GitHubFlavoredMarkdown first.
|
||||
|
||||
See the plugins' changelogs for details.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Plugin option checks use the option schemas first-party plugins ship. These are declared as `quartz.optionSchema`, the name Quartz Syncer reads, as a flat map of option to type (`{ limit: { type: "number" }, mode: { type: "enum", values: [...] } }`). Before, only a JSON Schema in `quartz.configSchema` was read, so no first-party plugin's schema was used. A misspelled option, an enum value that isn't allowed, or a value of the wrong type is now a warning. A value of the same type as the plugin's default is always accepted, even where a schema disagrees.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Permalinks work as in Obsidian Publish (jackyzha0/quartz#2572): `permalink: page` makes the note's address `/page`, whatever its file path. Links to the note, backlinks, the graph, the sitemap, RSS and the content index use the permalink, links inside the note still resolve relative to its file, and the note's file path redirects to the permalink (with AliasRedirects, like `aliases`). Previously the permalink was only a redirect to the file path. A permalink that is already another page's address is ignored with a warning. In navigation (the content trie used by the explorer, folder pages and breadcrumbs) the note stays in its folder, as on Obsidian Publish sites.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugins can ship files with the site: `externalResources()` may return `assets: [{ from, to }]` (a file or directory on disk), which Quartz copies to `static/plugins/<to>`. Client scripts find them through the new `window.quartzStaticUrl` page global (absolute URL of `static/`, valid across SPA navigations). Use it for large or optional client code loaded with `import()` only where needed, instead of inline scripts, which every page downloads. Invalid or conflicting targets and missing sources are build warnings.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugins can declare what they provide and need (`quartz.capabilities`); the build warns when a required provider is missing (e.g. "backlinks requires data `links` … enable configuration.links"). Rendered plugin components carry `data-quartz-plugin` / `data-quartz-component` attributes, so you can tell which plugin rendered which part of a page. `fetchData` resolves to `{}` instead of rejecting when `contentIndex.json` is missing.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugin management: plugin commands exit non-zero on failure, CLI edits keep comments in `quartz.config.yaml`, lockfile pins are honoured everywhere, npm plugins show up in `plugin list`, `plugin add` detects duplicates, misspelled plugin options are flagged, and the new `plugin doctor` checks config, lockfile and installs. `plugin config --set a.b=1` now writes a nested key.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugins can be marked deprecated with `quartz.deprecated` (a message naming the replacement) in their `package.json`. Quartz warns while a deprecated plugin is enabled — when the build loads the config (repeated in the end-of-build summary), in `plugin add` and in `plugin doctor` — and suggests removing it. The deprecated `hard-line-breaks` plugin is no longer listed in the default config and templates: ObsidianFlavoredMarkdown 2.0+ handles line breaks (`strictLineBreaks`).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Tag pages honour the TagPage `numPages` and `sort` options (tag-page 1.0.4); before, they always used the defaults. Plugin client scripts can use `window.quartzStaticUrl` and `window.quartzPrefetch` with the declarations in `@quartz-community/types` 1.3.1.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
On Windows, regenerating `.quartz/plugins/index.ts` (`npm run install-plugins`, which also runs before every `npm run build`) no longer skips npm plugins with "dist/index.d.ts could not be found", which left exports such as `ExternalPlugin.Explorer` undefined. The package's location was read from a `file:` URL's pathname (`/C:/…`), which is not a Windows path.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugins that fail to load (can't be installed, throw on import, export no plugin) are reported as errors with the plugin, version, the file and line where it failed and what to do, and listed again at the top of the end-of-build summary. Previously some of these failures were silent. Locally the build continues without them; in CI (`CI` set) it fails unless `QUARTZ_ALLOW_BROKEN_PLUGINS=1`. Fixed along the way: the entry module of npm-installed component plugins (and npm plugins without a declared category) was never imported, so their `init(options)` never ran.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
`quartz.ts` overrides (`ExternalPlugin.Explorer({...})`) work for npm plugins and for component plugins (#2565): overrides are registered under the key the loader looks up (the package name for npm plugins), and component constructors re-exported from a plugin's sub-module are wrapped too. The wrapper also returns what the plugin returns, so `ExternalPlugin.X(...)` works both as a statement and as a component in a layout override. `quartz plugin …` commands no longer drop npm plugins from the generated `.quartz/plugins/index.ts`; both generators are now one shared module.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Plugin fixes for Windows: relative aliases (`./old`, `../x`) redirect to the right page (alias-redirects 1.0.3), and git dates of notes in folders are read from git instead of the filesystem (created-modified-date 1.0.3).
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Updated default plugins (see each plugin's changelog for details):
|
||||
|
||||
- **Changed heading ids:** with SmartyPants on (the default), a heading containing `--` now gets the same id as on GitHub: `## Range 1--2` → `range-1--2` (was `range-12`). Links that hard-code the old id need updating; `[[page#Range 1--2]]` keeps working. Links Obsidian writes to headings containing `:`, `|`, `^`, `#` or `\` now reach them, and heading ids, links and table-of-contents entries share one slug function (GitHubFlavoredMarkdown 2.1.0, TableOfContents, CrawlLinks, utils 1.1).
|
||||
- **Bases now behave as in Obsidian 1.15** (BasesPage 1.2.0, checked against real Obsidian): subtracting dates gives a duration (`(due - today()).days`); nested tags match (`file.tags.contains("#project")` finds `#project/x`); dates display in the site's locale, and `date()` reads only ISO-style dates; cards use Obsidian's aspect ratio and layout; `link()` with any URL is an external link; a base opens on its first view; tags link to their tag pages; `this.<property>` in an embedded base reads the embedding note. Base views also list canvas and Excalidraw files with their real paths, `this` in an embedded base is that note, and Quartz's generated pages (404, tags, folder listings) no longer appear as notes. **Changed:** `file.tags` keeps `#` and the original case, the `tags` property no longer includes inline tags, `hasTag(a, b)` matches any of its tags, the root folder is `/`, text `contains` ignores case, and the cards' `imageAspectRatio` is height/width (it was inverted). `file.name` is as in Obsidian: a Markdown note's name has no extension (`Note`), other files keep theirs (`Plan.canvas`); `file.fullname` has the extension for every file.
|
||||
- Folder pages list folders that hold only canvas, base or other generated pages (FolderPage).
|
||||
- A footnote referenced only from a table cell past the table's columns is rendered, as in Obsidian (ObsidianFlavoredMarkdown 2.1.1, with remark-obsidian 2.2.0: faster parsing and fixes for deeply nested notes and `\r\n` line endings).
|
||||
- A short wikilink to an Obsidian folder note (`[[Topic]]` for `Topic/Topic.md`) reaches the folder page (utils 1.1).
|
||||
- NoteProperties no longer bundles gray-matter's `eval`-based JavaScript frontmatter engine.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Plugin version requirements are enforced: a plugin's `quartzVersion` (`package.json` → `quartz.quartzVersion`, any semver range) is checked when the config loads (a warning locally; in CI — `CI` set — the build fails unless `QUARTZ_ALLOW_INCOMPATIBLE_PLUGINS=1`), by `plugin add` and by `plugin doctor`, with a message saying whether to update Quartz or the plugin. Previously the field was never checked (and the old checker read `">=5.0.0"` as `0.0.0`).
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Plugin updates with the fixes from a test audit:
|
||||
|
||||
- note-properties: an empty `tags:` or `aliases:` no longer fails the build.
|
||||
- bases-page: sorting, filters, formulas and group headings work as in Obsidian.
|
||||
- encrypted-pages: a numeric `password` encrypts the page, and a custom `outputPath` works.
|
||||
- darkmode, reader-mode, syntax-highlighting and comments: no double handlers after a page is unlocked.
|
||||
- stacked-pages: links work under a base path.
|
||||
- breadcrumbs: `resolveFrontmatterTitle` is honoured.
|
||||
- canvas-page: a `#View` link selects that view.
|
||||
- search: fields left out of `fieldPriority` are searched, and excerpts keep their last word.
|
||||
- explorer: a note next to a folder of the same name stays listed, and folder options apply.
|
||||
- folder-page, og-image, description, table-of-contents, graph, obsidian-flavored-markdown and utils: smaller fixes.
|
||||
- latex: `customMacros` work with MathJax. ox-hugo: figure parameters in backticks.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Plugins use Quartz's own Preact instead of each bundling a copy, so components can use hooks and context across plugins (a component using `preact/hooks` with another plugin's components crashed), and plugin bundles are smaller. The default plugins and the plugin template are updated; a third-party plugin made from the template before this release still bundles its own copy until it updates its `tsup.config.ts` (see quartz-community/plugin-template).
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Prefetching: Quartz fetches pages before their links are followed, so they open at once. New `configuration.prefetch`:
|
||||
|
||||
- `viewport` (default): links on screen are fetched while the browser is idle, and links pointed at, focused or touched first.
|
||||
- `hover`: only links pointed at, focused or touched.
|
||||
- `"off"`.
|
||||
|
||||
It works with and without SPA routing. With SPA routing, fetched pages are kept in memory (five minutes, at most 40) and used by both page navigation and popover previews, which no longer download a page the router fetches again. Without it, Quartz asks the browser to prefetch (Speculation Rules, or `<link rel="prefetch">`). Nothing is prefetched from links to other sites, files, or pages the site doesn't have, or with Data Saver on or a 2G connection (except links pointed at). Add `data-no-prefetch` to a link to exclude it. See https://quartz.jzhao.xyz/features/prefetching
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
New `configuration.publishAssets: "referenced"` (default `"all"`): only copy the images, PDFs and other files that published pages link to or embed, so files that only unpublished notes use stay private (#2531, from #2544). References are matched against published (slugified) file names and include `<object data>` SVG embeds, `srcset` and URL-encoded paths.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
New `npx quartz info` command: prints the Quartz version (with `git describe`, branch and local changes), Node/npm/OS, the config file, built-ins and every plugin with its version, source and compatibility, as a Markdown block to paste into bug reports. The build banner and `plugin doctor` also show where the checkout is relative to the last release.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Relative links and embeds keep their query string after SPA navigation and in popovers (`./viewer.html?file=a.pdf` no longer loses `?file=a.pdf`).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
The Roam Research plugin works with ObsidianFlavoredMarkdown on, as in the default config (roam 1.1.0). `{{[[TODO]]}}`, `{{[[DONE]]}}`, `[[>]]` and `{{[[video]]: …}}` no longer render as wikilinks, and `__italic__` is italic instead of bold.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
Security: plugin commands no longer build shell commands from plugin sources, refs, pinned commits or package names (#2571). git and npm run with argument arrays, refs/commits/URLs/package names are validated (so a value can't be read as an option either), and generated plugin imports are written as escaped string literals. A source such as `github:owner/repo#main;cmd` used to run `cmd`; it is now rejected as an invalid ref. Also fixes restoring a plugin pinned in `quartz.lock.json` to a commit that is no longer its branch tip (#2559).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
New `layout.sidebars` option: how each sidebar handles content taller than the screen. `fit` (default, unchanged) keeps it one screen tall and components shrink and scroll themselves; `scroll` keeps it in view and lets it scroll itself, so nothing is ever out of reach; `static` lets it scroll away with the page. Page types can override it (`byPageType.<type>.sidebars`). New `docs` template for documentation sites (`npx quartz create --template docs`), with both sidebars `static`. Frames receive the modes as a `sidebars` prop and put them on sidebar elements as `data-sidebar-mode`, which plugins can target in CSS.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
SPA navigation follows redirects correctly: when a link is redirected (for example `folder` → `folder/` on static hosts, or an alias page's canonical link), relative links on the new page resolve against where it really is, and the address bar shows that URL. Links on folder pages and parent tag pages reached through slash-less links pointed one level too high.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
`npx quartz upgrade` shows the release notes of every version between the old and the new Quartz, then runs the new version's checks: it restores plugins, runs `plugin doctor` (plugin entries that are built in now, plugins that don't support the new version …) and lists plugin updates. Plugin install/restore skip plugins that are built into Quartz now, and `plugin doctor --fix` also removes their unused lockfile pins.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": minor
|
||||
---
|
||||
|
||||
Pages that page types render from files (`.base`, `.canvas`, Excalidraw drawings) follow the site's publish filters (quartz-community/bases-page#11). The filters see each such page with the frontmatter its page type gives it and `file.data.referencedBy`, the published pages that link to it; a page a filter rejects is not emitted and not listed in the content index, sitemap, RSS, folder pages, explorer or search, and can't be embedded. Before, every such file was published regardless of the filters. New transformer hook `virtualPageHtmlPlugins(ctx, content)`: rehype plugins run on these pages' rendered bodies, which never pass through `htmlPlugins`, so plugins such as encrypted-pages can encrypt them.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
A local plugin source written with Windows separators (`.\my-plugin`, `..\plugins\my-plugin`) is recognised as a local path. Before, it was read as a git or npm source and failed with "Expected github:owner/repo".
|
||||
|
||||
Pretty links shorten link text the same way on every OS: Windows also cut it at a backslash (`[[a\b]]` showed `b`).
|
||||
@@ -11,17 +11,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Preview
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Cache Quartz plugins
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: .quartz/plugins
|
||||
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
|
||||
|
||||
@@ -19,17 +19,17 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Cache Quartz plugins
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: .quartz/plugins
|
||||
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
|
||||
@@ -71,11 +71,11 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
- name: Get package version
|
||||
|
||||
@@ -16,17 +16,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy v5 to Cloudflare Pages
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Cache Quartz plugins
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: .quartz/plugins
|
||||
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
|
||||
|
||||
@@ -21,11 +21,11 @@ jobs:
|
||||
echo "OWNER_LOWERCASE=${OWNER,,}" >> ${GITHUB_ENV}
|
||||
env:
|
||||
OWNER: "${{ github.repository_owner }}"
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v5.6.0
|
||||
uses: rlespinasse/github-slug-action@v5.7.1
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4
|
||||
- name: Set up Docker Buildx
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
network=host
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@v4.1.2
|
||||
uses: sigstore/cosign-installer@v4.1.3
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v4
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
@@ -21,12 +21,13 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
actions: write # start the Docker build for the new tag
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -34,24 +35,43 @@ jobs:
|
||||
|
||||
- name: Create or update the release PR
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
uses: changesets/action@v2
|
||||
with:
|
||||
version: npm run version-packages
|
||||
title: "chore: release Quartz"
|
||||
commit: "chore: release Quartz"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
version-script: npm run version-packages
|
||||
pr-title: "chore: release Quartz"
|
||||
commit-message: "chore: release Quartz"
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Tag and publish the GitHub release
|
||||
if: steps.changesets.outputs.hasChangesets == 'false'
|
||||
if: steps.changesets.outputs.has-changesets == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Each step can be re-run: an existing tag on this commit, or an existing release, is
|
||||
# kept, and the Docker build is started again (a failed run used to stop at "already
|
||||
# exists" on the next attempt).
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG="v$VERSION"
|
||||
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
|
||||
echo "$TAG already exists — nothing to release."
|
||||
exit 0
|
||||
# The commit the tag points at on GitHub (empty when there is no tag yet); an annotated
|
||||
# tag is followed to its commit.
|
||||
tag_commit() {
|
||||
local ref type sha
|
||||
ref=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$TAG" --jq '.object.type + " " + .object.sha' 2>/dev/null) || return 0
|
||||
read -r type sha <<<"$ref"
|
||||
if [ "$type" = "tag" ]; then
|
||||
sha=$(gh api "repos/$GITHUB_REPOSITORY/git/tags/$sha" --jq '.object.sha')
|
||||
fi
|
||||
echo "$sha"
|
||||
}
|
||||
EXISTING=$(tag_commit)
|
||||
if [ -n "$EXISTING" ] && [ "$EXISTING" != "$GITHUB_SHA" ]; then
|
||||
if git merge-base --is-ancestor "$EXISTING" "$GITHUB_SHA" 2>/dev/null; then
|
||||
echo "$TAG was released at $EXISTING — nothing to release."
|
||||
exit 0
|
||||
fi
|
||||
echo "::error::$TAG already exists but points at $EXISTING, which is not this commit ($GITHUB_SHA) or one of its ancestors. Check the tag (delete it if it is wrong), then re-run this workflow."
|
||||
exit 1
|
||||
fi
|
||||
# Only versions produced by `changeset version` are released (guards against tagging
|
||||
# an arbitrary commit with a version that was never released through this workflow).
|
||||
@@ -60,8 +80,23 @@ jobs:
|
||||
echo "CHANGELOG.md has no section for $VERSION — not tagging."
|
||||
exit 0
|
||||
fi
|
||||
# GitHub creates the tag, on the commit this push brought (the merged release PR). A tag
|
||||
# made here with `git tag -a` is an unsigned tag object, which GitHub marks "Unverified"
|
||||
# (jackyzha0/quartz#2455). This one points straight at the commit, which shows as verified
|
||||
# because GitHub signs the commits it merges. `git describe --tags` sees it all the same.
|
||||
gh release create "$TAG" --target "$GITHUB_SHA" --title "Quartz $VERSION" --notes-file release-notes.md
|
||||
# The tag is a lightweight ref straight to the merged release commit, created here
|
||||
# before the release. GitHub signs the commits it merges, so the tag shows as verified.
|
||||
# Letting `gh release create` make the tag instead gives an unsigned annotated tag
|
||||
# object (tagger: whoever merged the release PR), which GitHub marks "Unverified"
|
||||
# (jackyzha0/quartz#2455). `git describe --tags` reads lightweight tags as well.
|
||||
if [ -z "$EXISTING" ]; then
|
||||
gh api "repos/$GITHUB_REPOSITORY/git/refs" -f ref="refs/tags/$TAG" -f sha="$GITHUB_SHA" >/dev/null
|
||||
else
|
||||
echo "$TAG already points at this commit — keeping it."
|
||||
fi
|
||||
if gh release view "$TAG" >/dev/null 2>&1; then
|
||||
echo "The $TAG release already exists — keeping it."
|
||||
else
|
||||
gh release create "$TAG" --verify-tag --title "Quartz $VERSION" --notes-file release-notes.md
|
||||
fi
|
||||
# A tag created with GITHUB_TOKEN doesn't trigger `on: push: tags`, so the Docker workflow
|
||||
# never built the versioned images; start it for the tag explicitly. Started with
|
||||
# `--ref vX.Y.Z`, the run's GITHUB_REF is refs/tags/vX.Y.Z, which is all
|
||||
# docker/metadata-action's `type=semver` tags need (it checks the ref, not the event).
|
||||
gh workflow run docker-build-push.yaml --ref "$TAG"
|
||||
+1
-1
@@ -1 +1 @@
|
||||
v22.16.0
|
||||
v22.22.0
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
# @jackyzha0/quartz
|
||||
|
||||
## 5.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 55311cb: Links: `disableBrokenWikilinks` is on by default. Internal links to pages that don't exist get the `broken` class, as Obsidian marks unresolved links (`is-unresolved`), so Quartz's and Obsidian themes' unresolved-link styles apply. Tag and folder pages, which are generated later, count as existing. Set `links.disableBrokenWikilinks: false` for the old behaviour.
|
||||
- 857de3b: Quartz now requires Node.js 22.22 or later (was 22), for chokidar 6, which watches content in `--serve` mode. chokidar 6 confirms each change against the file system before rebuilding and fixes missed and duplicate change events.
|
||||
- df11e31: Experimental `extends` in `quartz.config.yaml`: `extends: default` (or a path) starts from `quartz.config.default.yaml` and applies only the changes in your file. `configuration` and `layout` merge key by key, plugin entries merge with the default entry of the same plugin. Configs without `extends` behave exactly as before.
|
||||
- 09a6b03: `contentIndex.json` entries have `dateFromFrontmatter: true` when their `date` is the one set in the page's frontmatter for the configured date type (not from git or the file system), so client-side components can tell explicit dates apart, e.g. for folder dates in the explorer.
|
||||
- d5dad62: `contentIndex.json` entries now include the page's `date` (the one `defaultDateType` selects) as an ISO 8601 string, so client-side components such as the explorer can sort by date. Pages without a date have no `date` field.
|
||||
- 2209ee6: Layout conditions: add `is-index` (only on the home page) and `is-folder-index` (only on folder index pages), and let `not-<condition>` negate any condition, built-in or registered (`not-has-tags`, `not-has-backlinks`, …).
|
||||
- c770681: Transclusions use Obsidian's embed markup: a `div.markdown-embed-title` (the note's title, for a whole-note embed; it was an `h1`), then the content in `div.markdown-embed-content > div.markdown-preview-view.markdown-rendered`, then the link to the original. Obsidian themes' embed styles apply (embed titles, padding, maximum height). The title looks as before without a theme. Obsidian's icon link to the note (`a.markdown-embed-link`, Lucide's maximize-2) follows; Quartz hides it, and Obsidian themes, through @quartz-themes/core, show it in the embed's corner.
|
||||
- c229350: Plugin entries can declare `before:` / `after:` (plugin names). They are checked against `order`: between plugins with the same order they decide, and a contradiction, a cycle or an unknown name stops the build with a clear error. `extends:` also accepts an `https://` URL, fetched with a timeout and cached in `.quartz-cache/extends/` for offline builds (`QUARTZ_EXTENDS_OFFLINE=1`).
|
||||
- b25eba0: New opt-in `configuration.slugs.stripDiacritics`: strips accents and other diacritics from generated slugs (`české/čeština.md` → `/ceske/cestina`). Links, embeds, aliases, permalinks, tags and folder pages resolve to the stripped addresses; heading anchors keep their diacritics. Turning it on changes the URLs of existing pages; their old addresses redirect to the new ones. Only Latin letters change: they lose their accents and fold to ASCII (`ł` → `l`, `ø` → `o`, `ß` → `ss`, `æ` → `ae`); other scripts (Korean, Japanese, Chinese, Greek, Cyrillic, Indic, Hebrew, Arabic, …) are left as written. Plugins that make slugs follow the option when they bundle `@quartz-community/utils` 1.3 or later, as the plugins updated in this release do (1.3.1 for the ASCII folding).
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f7b41e7: Block anchors are `#^id`, as in Obsidian: `@quartz-community/utils` 1.3.2 and `@quartz-community/rehype-obsidian` 1.6.0, bundled by obsidian-flavored-markdown 2.5.3, github-flavored-markdown 2.2.2, canvas-page 1.1.4, note-properties 1.2.3 and bases-page 1.5.5, give blocks `id="^id"` and link to them as `#^id`. A block and a heading with the same name (`^para-1`, `## Para 1`) no longer share an id, so `[[#^para-1]]` and `[[#Para 1]]` each reach their own target. canvas-page also scopes the ids of text nodes rendered with `textNodeMarkdown: basic`.
|
||||
- 3df0062: Block anchors are `#^id`: with @quartz-community/utils 1.3.2 and rehype-obsidian 1.6.0, blocks get the id `^id` and links to them `#^id` (was `#id`), as in Obsidian, so block `^para-1` and heading `## Para 1` no longer share an id. A block transclusion finds its block whatever the case of its `^id` (`![[note#^Para-1]]`), and the popover scrolls to a block it links to.
|
||||
- 2b061ab: Links: links to files Quartz emits, such as `[feed](/index.xml)`, `/sitemap.xml`, `/static/icon.png` or `/404.html`, are no longer marked `broken`. A link is only marked when its target is known to be missing: a page that doesn't exist, or a vault file (image, audio, video, PDF, canvas, base) the content doesn't have. Other files may come from an emitter, so they are left unmarked.
|
||||
- 734e1b8: Links to pages removed by a filter (drafts, ExplicitPublish) are now marked `broken` (with `data-filtered="<filter>"`), like links to pages that don't exist — they 404 on the site.
|
||||
- 9de19e3: `extends` (experimental): `npx quartz plugin list`, `status`, `doctor`, `install`, `prune` and `npx quartz info` read the merged configuration, as the build does. Before, they saw only the entries in your own file, so `list` showed a handful of plugins and `doctor` warned that overlay entries without `enabled` are disabled. `enable`, `disable` and `config` now work on plugins from a base by adding or changing your own entry for them (only that change is written; the merged configuration never is), `config --unset` resets an option a base sets with `null`, and `remove` refuses a plugin that comes from a base. `npx quartz build --serve` also rebuilds when a local base file changes.
|
||||
- a51b7df: `extends` (experimental): presets in a list now stack. With `extends: [./a.yaml, ./b.yaml]`, where both extend `default`, everything `a.yaml` changed was lost, because `b.yaml` was merged on top with all of `default` again. Each file of the `extends` chain is now applied once, after the bases it extends, so the order is `default` → `a.yaml` → `b.yaml` → your file, and later entries win only where they change the same thing.
|
||||
|
||||
Also: a plugin source with a `subdir` and no `name` is matched by repository and folder, so an entry for one plugin of a monorepo no longer changes another; `extends: []` extends nothing; an empty base file is an empty config; `HTTPS://` URLs are accepted; and `plugins:` that isn't a list gets a clear error.
|
||||
|
||||
- b2241c3: Layout conditions: `is-folder-index` is false on tag pages. The all-tags page (`tags/index`) matched it, so components meant for folder pages showed there; nothing under `tags/` counts as a folder index now.
|
||||
- cc253be: Footnote references and back-links keep the `internal` class but no longer get `internal-link`: Obsidian doesn't treat them as note links, and Obsidian themes' link styles (underline, colour) overrode their footnote styles.
|
||||
- 71454c7: Markdown links in frontmatter with an angle-bracket destination, which Obsidian writes for paths with spaces (`[Exec Briefing](<./Exec Briefing.md>)`), resolve to the note instead of a missing `….md` page, so the note gets the backlink and graph edge.
|
||||
- 8be4d8e: Markdown links in frontmatter are read as CommonMark reads them: angle-bracket destinations with parentheses (`[b](<Note (2024).md>)`), balanced parentheses in plain destinations (`[d](Note_(2024).md)`), titles in `"…"`, `'…'` or `(…)` (`[c](<My Note.md> "t")`), and backslash escapes. They pointed at `note-(2024` and `my-note.md-t`, so the linked note got no backlink or graph edge.
|
||||
- c33b6cf: @quartz-community/graph 1.0.5: the graph scales to large sites. On 3,000 notes and 33,000 links, the global graph opens in 0.5 s instead of 2.5 s, and it stops using the CPU once its layout settles. It also loads d3 and PixiJS as pinned, integrity-checked versions, with PixiJS's minified build (200 KB instead of 2.5 MB on every page).
|
||||
- 6ce31a4: - `@quartz-community/graph` 1.0.7: the local graph on folder index pages shows the folder's connections instead of a single node.
|
||||
- `@quartz-community/utils` 1.2.1: `unescapeHTML` decodes each entity once, so a page description that mentions `<br>` keeps it in the page's meta tags instead of turning it into `<br>`.
|
||||
- 9d6cdba: Pages get a canonical link (`<link rel="canonical">`, the page's URL as the sitemap lists it), and `og:url` uses the same URL: `folder/` instead of `folder/index`, and the site root for the home page. `og:site_name` is a `property` (it was a `name`, which Open Graph readers ignore). Notes are `og:type: article`, with `article:modified_time` and, when the frontmatter has a date, `article:published_time`. The home page and folder and tag pages stay `website`.
|
||||
|
||||
The `fonts.gstatic.com` preconnect is a CORS connection, which the font files can reuse, and the unused `cdnjs.cloudflare.com` preconnect is gone.
|
||||
|
||||
- c79adab: Each component's CSS is parsed on its own before the component stylesheet is put together, so a missing `}` or an unclosed comment in one plugin's CSS no longer swallows the rules of every component after it, and a stray `}` no longer fails the build; a syntax error is reported with the component's name.
|
||||
- 3b78d16: Frontmatter is read with js-yaml 5, using YAML 1.2's core schema (the values Quartz read before are unchanged). Frontmatter with only comments now has no properties, as in Obsidian, instead of being reported as invalid frontmatter.
|
||||
- a55f25f: The page frames mark their regions for assistive technology: the centre column is a `<main>` (it was a `div.center`; the classes are unchanged) and the default frame's sidebars are `<aside>` elements. Screen readers can jump to the page's content, and the page looks the same.
|
||||
- 7714325: Heading transclusions and their footnotes look through Obsidian's per-block wrappers (`div.el-h2 > h2`), which `@quartz-community/rehype-obsidian` now renders around each of a note's top-level blocks. `blockOf()` (in `components/transcludeScope.ts`) returns the block inside a wrapper, for other code that walks a page's top-level blocks.
|
||||
- b4d7358: Obsidian's fold arrows in headings and list items (`.heading-collapse-indicator`, `.list-collapse-indicator`, rendered by rehype-obsidian for Obsidian themes) are hidden unless obsidian-flavored-markdown's `foldHeadings` / `foldLists` turn folding on.
|
||||
- 0bab8ea: @quartz-community/obsidian-flavored-markdown 2.4.0 (Obsidian's block wrappers, heading and list folding, missing-attachment embeds, Pele diagrams) and @quartz-community/og-image 1.1.2 (no build failure on emoji variants such as the footnote back-link `↩︎`).
|
||||
- db7484e: @quartz-themes/core 3.2.0 (Obsidian's block wrappers styled natively, property inputs, fold arrows) and the plugin releases that carry Obsidian's markup:
|
||||
|
||||
- latex 1.1.0: maths in Obsidian's math elements;
|
||||
- note-properties 1.2.0: Obsidian's properties markup;
|
||||
- search 1.1.0: the quick switcher's classes, excerpts as written;
|
||||
- explorer 1.1.2: Obsidian's folder rows;
|
||||
- table-of-contents 1.0.4: the collapsed table of contents no longer clips its header;
|
||||
- graph 1.0.4: colours follow Obsidian themes;
|
||||
- syntax-highlighting 1.0.4: the copy button's stylesheet in the base layer;
|
||||
- canvas-page 1.0.4: heading embeds look through the block wrappers.
|
||||
|
||||
- fd744c0: The `obsidian` template folds headings and lists (obsidian-flavored-markdown's `foldHeadings` and `foldLists`), as Obsidian does by default.
|
||||
- 7b4da1c: A note whose name ends in "index" (`reindex.md`) is an `og:type: article` again. The home page and folder index pages were told apart by the slug ending in `index`, not by its last segment, so such notes were `website` and had no article dates.
|
||||
- bc0e393: Plugin order: `before:` / `after:` naming a plugin that is built into Quartz now (`crawl-links`, `remove-draft`, `content-index`) passed validation but was ignored. They now mean the built-in that replaced them (`links`, `drafts`, `contentIndex`), so `before: crawl-links` orders the plugin before link processing, and is checked against its `order` like `before: links`.
|
||||
- 52af9f1: `PageList` entries are `h2` headings under the page's `h1` (they were `h3`, which skipped a level for screen readers), at the `h3`'s size, as in `@quartz-community/folder-page` and `@quartz-community/tag-page`.
|
||||
- f646ffe: Plugin fixes from the pre-release audit:
|
||||
|
||||
- `@quartz-community/latex` 1.1.2: KaTeX's stylesheet applies on pages whose maths comes from a transclusion or a popover, and after SPA navigation (it stayed print-only).
|
||||
- `@quartz-community/obsidian-flavored-markdown` 2.5.2: bundles rehype-obsidian 1.5.1 and remark-obsidian 2.2.4, so same-page block links (`[[#^id]]`) work, only real YouTube hosts become embeds, large notes use less memory, and under `preset: strict` other plugins' text rewrites survive in notes with callouts; `math: false` works under `strict` with the LaTeX plugin; Markdown-link embeds with a query or in reference style are transcluded.
|
||||
- `@quartz-community/github-flavored-markdown` 2.2.1: `replacements` leaves autolink text alone, applies to wikilink aliases, and honours backslash escapes; `data-heading` keeps the heading as written.
|
||||
- `@quartz-community/canvas-page` 1.1.2 and `@quartz-community/tag-page` 1.0.7: file nodes find headings as Obsidian writes them (`#Sub Section`), embeds in text nodes are filled in, text-node tags get tag pages, and ids are unique per node; the tag index lists pages as `h3` under each tag.
|
||||
- `@quartz-community/search` 1.1.2: Enter on a result navigates without a full reload, `#tags` match with `slugs.stripDiacritics`, and searches ignore accents (`creme` finds "Crème").
|
||||
- `@quartz-community/explorer` 1.2.2: keeps the current page open after a `render` event without details (encrypted pages), and each explorer's phone button is named after its title.
|
||||
- `@quartz-community/bases-page` 1.5.4: view tabs follow the WAI-ARIA tabs pattern (arrow keys, unique ids).
|
||||
- `@quartz-community/graph` 1.0.8: no animation loop while the graph is idle, closed or removed.
|
||||
- `@quartz-community/created-modified-date` 1.0.5: stand-in dates are marked, so they stay out of `contentIndex.json`, and git dates work for a symlinked vault in a content folder outside git.
|
||||
- `@quartz-community/og-image` 1.1.3, `@quartz-community/ox-hugo` 1.0.3, `@quartz-community/breadcrumbs` 1.0.5, `@quartz-community/folder-page` 1.1.3, `@quartz-community/note-properties` 1.2.2: descriptions decoded once and keycap/flag emoji in social images; captioned figures and indented code in ox-hugo; utils 1.3.1 (Latin-only `stripDiacritics`).
|
||||
|
||||
- 8c61245: Plugin updates:
|
||||
|
||||
- `@quartz-community/explorer` 1.2.0: `sort` option (rules applied in sequence, e.g. folders first, then newest) and `rootFolder` option, so several explorers on one page work side by side; the `order` option is applied; scroll fixes (the bottom fade, the scroll position across SPA navigation with `layout.sidebars.left: scroll`, and opening a page no longer scrolls the page itself).
|
||||
- `@quartz-community/obsidian-flavored-markdown` 2.5.0: notes, canvases and bases embedded with a Markdown link (``) are transcluded, as in Obsidian; `math` option (`false` leaves dollar signs as text). With `@quartz-community/rehype-obsidian` 1.5.1: same-page block links (`[[#^id]]`) reach their block, and only images on YouTube become YouTube embeds.
|
||||
- `@quartz-community/github-flavored-markdown` 2.2.0: `singleTilde` option (`false` strikes only `~~text~~`, as Obsidian does) and `replacements` option (for example Quartz 4's arrows), empty by default.
|
||||
- `@quartz-community/canvas-page` 1.1.0: the mouse wheel and trackpad pan the canvas, as in Obsidian (`wheelBehavior`); text nodes are rendered with the site's Markdown plugins, so Mermaid diagrams, callouts and math work in them (`textNodeMarkdown`).
|
||||
- `@quartz-community/utils` 1.3.0: the `stripDiacritics` slug option reaches plugins too; links in embedded folder notes point at the right directory.
|
||||
- `@quartz-community/created-modified-date` 1.0.4: git dates resolve when `content/` is a symlink to a vault in another git repository.
|
||||
- `@quartz-community/ox-hugo` 1.0.2: the Markdown rewrites leave code alone and no longer match across unrelated text.
|
||||
|
||||
- 96fc9c1: Plugin updates for accessibility and page speed:
|
||||
|
||||
- Text in the table of contents, footer, folder and tag listings, search button and Bases group headings meets WCAG AA contrast in light and dark mode. Under an Obsidian theme from quartz-themes (`@quartz-themes/core` 3.2.1), the search button and Bases group headings keep the theme's faint text colour.
|
||||
- Page listings in folder and tag pages use `<h2>` titles (at the previous size), so headings no longer skip a level.
|
||||
- Valid ARIA and unique ids in the table of contents, explorer, backlinks, heading anchors and Bases views.
|
||||
- The graph loads d3 and PixiJS only when it scrolls into view (or when the global graph opens), instead of on every page.
|
||||
- KaTeX's stylesheet no longer blocks rendering on pages without math.
|
||||
- `@quartz-community/remark-obsidian` 2.2.3: the `legacy` parser no longer uses memory that grows with the square of the note's length on notes with many tables, lists or other blocks.
|
||||
|
||||
- 661b56a: Release tags are verified on GitHub: the release workflow creates each `vX.Y.Z` tag as a lightweight tag on the merged release commit (which GitHub signs) instead of letting the release create an unsigned annotated tag. It also starts the Docker build for the tag, so versioned images (`5.3.0`, `5.3`) are published for each release (none were built for 5.1.0–5.2.2).
|
||||
- 799b8e3: Component styles are one stylesheet (`component-<hash>.css`, in the `quartz-base` layer as before) instead of one per component. Pages load about 20 fewer render-blocking stylesheets (29 to 11 on the docs site), and the styles they compute are unchanged.
|
||||
- e0f1e03: A scroll made just before Back (less than 150 ms) is no longer lost: Forward returns to where the reader scrolled.
|
||||
- 3ab4503: With SPA navigation, Back and Forward return to where the reader was on each page. The router keeps each history entry's scroll position and restores it after swapping the page in. The browser restored the position while the previous page was still on screen, so it came out wrong: Back after a table-of-contents link stayed at the heading, and Back to a page landed at its top or bottom. Back and Forward between headings of the same page now only scroll, instead of reloading the page, and a reload keeps the position.
|
||||
- 0d05ef7: Build-time stand-in dates are no longer written as real dates. A page whose date no source gives (for example `defaultDateType: published` and no `published:`, or an invalid one) gets the build time from the date plugin; `contentIndex.json` now leaves its `date` out, and `article:published_time` / `article:modified_time` are only set for real dates (an invalid `published:` gave the build time). RSS and the sitemap keep the build time. created-modified-date 1.0.5 lists its stand-ins in `file.data.fallbackDates`; with older versions a `published` date only counts when the frontmatter sets it.
|
||||
- dd667ee: `slugs.stripDiacritics` reaches plugins and the browser: bases-page 1.5.3, breadcrumbs 1.0.4, canvas-page 1.1.1, explorer 1.2.1, folder-page 1.1.2, note-properties 1.2.1 and obsidian-flavored-markdown 2.5.1 bundle `@quartz-community/utils` 1.3, so their links, tag pages from inline tags, canvas file nodes and base views use the stripped addresses. Quartz also passes the option to scripts in the browser, so the explorer places folders and pages with accents where the build put them.
|
||||
- 093d233: The templates' colours meet WCAG AA contrast (4.5:1) on their backgrounds. Light `gray` goes from #b8b8b8 to #727272 (was 1.9:1), dark `gray` from #646464 to #7f7f7f (was 3.1:1), and light `tertiary`, the link hover colour, from #84a59d to #587971 (was 2.5:1). Text selection mixes 40% of `tertiary` instead of 60%, so text stays readable on it in both modes. Existing sites keep the colours in their own `quartz.config.yaml`.
|
||||
- 7c3df89: Type checking (`npm run check`) uses TypeScript 7. `tsconfig.json` switches `moduleResolution` from `node` (removed in TypeScript 7) to `bundler`, which reads packages' `exports`: custom code that imports a package's internal files may need to import from the package itself.
|
||||
- af36801: Links to a folder or tag page that isn't generated (a folder whose notes are all drafts or that holds only images, a tag no published page uses) are marked broken, and in watch mode a page whose links to a page that was published or filtered out change is re-emitted, so its marks don't go stale.
|
||||
|
||||
## 5.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ee1cdff: Updates `@quartz-themes/core` to 3.1.1: the Obsidian template (`theme: default`) works again (since 3.0 the plugin failed to initialise looking "default" up as a community theme); `default`, `obsidian` and `Obsidian default` use Obsidian's built-in theme.
|
||||
|
||||
## 5.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3f8104f: Fonts: explicitly configured `body`, `code` and `interface` fonts now apply with an Obsidian theme. They are also written to Obsidian's `--font-*-override` variables on `body`, which the theme's styles read; before, the theme's own `body` font variables won over Quartz's `:root` ones.
|
||||
- c392e17: Fonts: the `interface` font and per-heading fonts (`h1` … `h6`) are now loaded from Google Fonts (or self-hosted with `fontOrigin: selfHosted`) like the other fonts; before, they only rendered if installed locally. A font with a single weight now loads that weight (`weights: [700]` loaded 400), and a single-weight italic font no longer makes the Google Fonts request fail.
|
||||
- 7531e67: On phones and tablets, one too-wide item in the header row (a long page title, or an Obsidian theme's styled header) no longer widens the page past the screen. The content column is `minmax(0, 1fr)` instead of `auto` (also in the full-width and minimal frames), and text in the phone header row may break anywhere.
|
||||
- 95e96b4: Updates `@quartz-themes/core` to 3.1, which converts any Obsidian community theme at build time: name a theme as Obsidian lists it (`Minimal`, `AnuPpuccin`), a GitHub repository, a URL or a local `theme.css`; Style Settings exports and CSS snippets apply as in Obsidian. Theme ids from 2.x (`tokyo-night`) keep working; `aspects`, `include`, `calloutStyle` and `fonts` were removed, and the `@quartz-themes/<theme>` packages are no longer needed. Quartz keeps its own page layout under a theme, `themeFonts: false` uses the site's Quartz fonts, and a theme's embedded fonts ship as separate files. See [ThemesCore](https://quartz.jzhao.xyz/plugins/ThemesCore).
|
||||
|
||||
## 5.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 4ed26b3: `quartz build --config <path>` (or `-C`) reads the site configuration from another file than `./quartz.config.yaml`, so the config can live with the content outside the Quartz folder, and one Quartz install can build several content repositories (#2646). With `--watch`/`--serve`, changes to that file trigger a rebuild.
|
||||
- 607ccb8: Theme support for Obsidian themes: plugin factories may be async (Quartz awaits them); font loading is built in as `configuration.fonts` (formerly the `@quartz-community/quartz-fonts` plugin, whose config entry is applied automatically); callouts and transclusions render as `<div>` like in Obsidian; popovers carry Obsidian's `hover-popover`/`markdown-embed` classes.
|
||||
- 9705969: Transformers can declare `renderTransforms`: transforms of a page's content when it is rendered, `before` transclusions are inlined and page types' `treeTransforms` run (bases are filled in), and `after` them, on the finished content. encrypted-pages uses them to encrypt a note's finished content, so bases and transclusions in encrypted notes show when unlocked (quartz-community/encrypted-pages#2).
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ed4f653: Bases (bases-page 1.4.0) render closer to Obsidian:
|
||||
|
||||
- custom summaries are evaluated, and summaries show their name and appear per group;
|
||||
- `html()`, `image()`, `icon()`, regular expressions and `file.backlinks` work in formulas;
|
||||
- `kanban` views, `groupOrder`, grouped list and cards views, and the list and row height options work.
|
||||
|
||||
- 99685cf: Bases inside a transcluded note render that note's own base, and links in bases follow `configuration.links` (external-link icon, new tab, lazy images, popovers) (bases-page 1.5.1).
|
||||
- 9a04652: Bases columns are labelled with the property's name, as in Obsidian (`priority`, `file name`), instead of title-cased (`Priority`, `Name`); bases-page's new `propertyLabels: title` option keeps the title-cased labels (bases-page 1.5.0).
|
||||
- 9c46b01: Updates `@quartz-community/obsidian-flavored-markdown` to 2.3.1, which renders callout titles in `.callout-title-inner` without a `<p>`, as in Obsidian (themes put the title below its icon otherwise). Callout titles are styled on `.callout-title-inner` itself (colour, margin, line height); the `> p` rule stays for sites on an older obsidian-flavored-markdown.
|
||||
- cdc5a02: Updates dependencies with minor and patch releases: `@clack/prompts` 1.9.0, `@napi-rs/simple-git` 1.2.0, `isomorphic-git` 1.44.18, `minimatch` 11.0.9, `preact-render-to-string` 6.8.3 and `prettier` 3.10.1.
|
||||
- 8578f2f: Permalinks work on large sites: sites of 192 or more files are parsed in worker threads, which didn't receive the permalinks, so a note with a `permalink` was published at its file path (#2644). A permalink with `.` or `..` segments is ignored with a warning instead of writing pages outside the output folder (#2641). With `prettyLinks`, a wikilink to a note whose name has a space or a non-ASCII letter reads as the note's name without its folder, as other links do (#2643).
|
||||
- 166d09b: `quartz plugin install` moves a plugin to its pinned commit even when the plugin's build left tracked files changed (its `package-lock.json`). In CI, a plugin cache restored through `restore-keys` kept those changes, and installing an updated plugin failed with "Please commit your changes or stash them" (#2639).
|
||||
- 6f872d4: Updates `@quartz-community/alias-redirects` to 1.0.4 (aliases that point outside the site are skipped, #2641) and `@quartz-community/note-properties` to 1.1.5 (links in properties to missing pages get the `broken` class with `disableBrokenWikilinks`, #2635).
|
||||
- 0ab525c: Updated plugins that rely on Quartz 5.1 and now declare it (`quartzVersion: ">=5.1.0"`): encrypted-pages 1.2.0, explicit-publish 1.2.0, unlisted-pages 1.2.0, obsidian-flavored-markdown 2.2.0, folder-page 1.1.0 and bases-page 1.3.0.
|
||||
- 49d0563: Transcluded content no longer duplicates ids. Headings and footnotes inside a transclusion get ids unique on the page, and the links inside it go to them, so the host's footnotes and a `[[#Heading]]` link inside a transclusion jump to the right place. A same-page link whose target isn't in the transcluded section links to the transcluded page. A heading transclusion (`![[note#Heading]]`) holds only the footnotes it references instead of the page's whole footnotes section.
|
||||
|
||||
## 5.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- eab5c53: A page type's `generate` can be async: it may return a promise of its virtual pages, which Quartz awaits in full and incremental builds. Page types that create pages from other files (like `.mdx`) can now run content through the site's transformers or bundle with esbuild; previously a promise crashed the build with "virtualPages is not iterable" (#2575).
|
||||
- f768b1e: Clearer failures: errors thrown by a plugin now name the plugin (package, version, source), what it was doing (transforming, filtering, emitting, rendering a component) and the file or page, list problems Quartz already knew about that plugin (incompatible Quartz version, missing required data), and say how to check and where to report it. Plugin stack frames are no longer hidden. Warnings from loading the config are repeated in a summary at the end of the build, together with a note about links to pages that are not on the site (including links to drafts).
|
||||
- f768b1e: Frontmatter parsing, link resolution, draft handling and the content index are now built into Quartz (configured under `configuration.frontmatter`, `.links`, `.drafts` and `.contentIndex`) instead of being plugins that silently broke the site when disabled. Existing `crawl-links`, `remove-draft` and `content-index` entries keep working and are applied automatically; `npx quartz plugin doctor --fix` moves them into `configuration`. Plugins can add fields to `contentIndex.json` with an `extendContentIndex` hook, and emitters can reuse the built index via `ctx.contentIndex`. The effective built-in settings are available to plugins as `ctx.cfg.configuration.<key>`.
|
||||
- e4ebd28: Markdown renders as it does in Obsidian: Quartz now uses ObsidianFlavoredMarkdown 2.0 and GitHubFlavoredMarkdown 2.0.
|
||||
|
||||
- **Line breaks changed:** a single line break inside a paragraph now renders as `<br>`, as in Obsidian's default reading view. Set `strictLineBreaks: true` in the ObsidianFlavoredMarkdown options to keep the previous behaviour (a space).
|
||||
- ObsidianFlavoredMarkdown parses with Obsidian's own parser by default (`preset: "legacy"`). Use `preset: "strict"` for TOML (`+++`) frontmatter or plugins that add their own Markdown syntax.
|
||||
- Also new: callouts parsed like Obsidian, inline footnotes (`text^[note]`), image sizes on Markdown images (``), Mermaid diagrams that follow the theme's colours, an opt-in Pele diagram renderer, and inline tags that only link to tag pages that exist.
|
||||
- GitHubFlavoredMarkdown now runs before ObsidianFlavoredMarkdown (order 30, then 40), as in the default config. If your config sets `order` for either plugin, keep GitHubFlavoredMarkdown first.
|
||||
|
||||
See the plugins' changelogs for details.
|
||||
|
||||
- 15b8eef: Permalinks work as in Obsidian Publish (jackyzha0/quartz#2572): `permalink: page` makes the note's address `/page`, whatever its file path. Links to the note, backlinks, the graph, the sitemap, RSS and the content index use the permalink, links inside the note still resolve relative to its file, and the note's file path redirects to the permalink (with AliasRedirects, like `aliases`). Previously the permalink was only a redirect to the file path. A permalink that is already another page's address is ignored with a warning. In navigation (the content trie used by the explorer, folder pages and breadcrumbs) the note stays in its folder, as on Obsidian Publish sites.
|
||||
- c84f348: Plugins can ship files with the site: `externalResources()` may return `assets: [{ from, to }]` (a file or directory on disk), which Quartz copies to `static/plugins/<to>`. Client scripts find them through the new `window.quartzStaticUrl` page global (absolute URL of `static/`, valid across SPA navigations). Use it for large or optional client code loaded with `import()` only where needed, instead of inline scripts, which every page downloads. Invalid or conflicting targets and missing sources are build warnings.
|
||||
- f768b1e: Plugins can declare what they provide and need (`quartz.capabilities`); the build warns when a required provider is missing (e.g. "backlinks requires data `links` … enable configuration.links"). Rendered plugin components carry `data-quartz-plugin` / `data-quartz-component` attributes, so you can tell which plugin rendered which part of a page. `fetchData` resolves to `{}` instead of rejecting when `contentIndex.json` is missing.
|
||||
- f768b1e: Plugin management: plugin commands exit non-zero on failure, CLI edits keep comments in `quartz.config.yaml`, lockfile pins are honoured everywhere, npm plugins show up in `plugin list`, `plugin add` detects duplicates, misspelled plugin options are flagged, and the new `plugin doctor` checks config, lockfile and installs. `plugin config --set a.b=1` now writes a nested key.
|
||||
- 3c18be8: Plugins can be marked deprecated with `quartz.deprecated` (a message naming the replacement) in their `package.json`. Quartz warns while a deprecated plugin is enabled — when the build loads the config (repeated in the end-of-build summary), in `plugin add` and in `plugin doctor` — and suggests removing it. The deprecated `hard-line-breaks` plugin is no longer listed in the default config and templates: ObsidianFlavoredMarkdown 2.0+ handles line breaks (`strictLineBreaks`).
|
||||
- 50203da: Plugins that fail to load (can't be installed, throw on import, export no plugin) are reported as errors with the plugin, version, the file and line where it failed and what to do, and listed again at the top of the end-of-build summary. Previously some of these failures were silent. Locally the build continues without them; in CI (`CI` set) it fails unless `QUARTZ_ALLOW_BROKEN_PLUGINS=1`. Fixed along the way: the entry module of npm-installed component plugins (and npm plugins without a declared category) was never imported, so their `init(options)` never ran.
|
||||
- 01bc5c5: Updated default plugins (see each plugin's changelog for details):
|
||||
|
||||
- **Changed heading ids:** with SmartyPants on (the default), a heading containing `--` now gets the same id as on GitHub: `## Range 1--2` → `range-1--2` (was `range-12`). Links that hard-code the old id need updating; `[[page#Range 1--2]]` keeps working. Links Obsidian writes to headings containing `:`, `|`, `^`, `#` or `\` now reach them, and heading ids, links and table-of-contents entries share one slug function (GitHubFlavoredMarkdown 2.1.0, TableOfContents, CrawlLinks, utils 1.1).
|
||||
- **Bases now behave as in Obsidian 1.15** (BasesPage 1.2.0, checked against real Obsidian): subtracting dates gives a duration (`(due - today()).days`); nested tags match (`file.tags.contains("#project")` finds `#project/x`); dates display in the site's locale, and `date()` reads only ISO-style dates; cards use Obsidian's aspect ratio and layout; `link()` with any URL is an external link; a base opens on its first view; tags link to their tag pages; `this.<property>` in an embedded base reads the embedding note. Base views also list canvas and Excalidraw files with their real paths, `this` in an embedded base is that note, and Quartz's generated pages (404, tags, folder listings) no longer appear as notes. **Changed:** `file.tags` keeps `#` and the original case, the `tags` property no longer includes inline tags, `hasTag(a, b)` matches any of its tags, the root folder is `/`, text `contains` ignores case, and the cards' `imageAspectRatio` is height/width (it was inverted). `file.name` is as in Obsidian: a Markdown note's name has no extension (`Note`), other files keep theirs (`Plan.canvas`); `file.fullname` has the extension for every file.
|
||||
- Folder pages list folders that hold only canvas, base or other generated pages (FolderPage).
|
||||
- A footnote referenced only from a table cell past the table's columns is rendered, as in Obsidian (ObsidianFlavoredMarkdown 2.1.1, with remark-obsidian 2.2.0: faster parsing and fixes for deeply nested notes and `\r\n` line endings).
|
||||
- A short wikilink to an Obsidian folder note (`[[Topic]]` for `Topic/Topic.md`) reaches the folder page (utils 1.1).
|
||||
- NoteProperties no longer bundles gray-matter's `eval`-based JavaScript frontmatter engine.
|
||||
|
||||
- f768b1e: Plugin version requirements are enforced: a plugin's `quartzVersion` (`package.json` → `quartz.quartzVersion`, any semver range) is checked when the config loads (a warning locally; in CI — `CI` set — the build fails unless `QUARTZ_ALLOW_INCOMPATIBLE_PLUGINS=1`), by `plugin add` and by `plugin doctor`, with a message saying whether to update Quartz or the plugin. Previously the field was never checked (and the old checker read `">=5.0.0"` as `0.0.0`).
|
||||
- 6210f28: Prefetching: Quartz fetches pages before their links are followed, so they open at once. New `configuration.prefetch`:
|
||||
|
||||
- `viewport` (default): links on screen are fetched while the browser is idle, and links pointed at, focused or touched first.
|
||||
- `hover`: only links pointed at, focused or touched.
|
||||
- `"off"`.
|
||||
|
||||
It works with and without SPA routing. With SPA routing, fetched pages are kept in memory (five minutes, at most 40) and used by both page navigation and popover previews, which no longer download a page the router fetches again. Without it, Quartz asks the browser to prefetch (Speculation Rules, or `<link rel="prefetch">`). Nothing is prefetched from links to other sites, files, or pages the site doesn't have, or with Data Saver on or a 2G connection (except links pointed at). Add `data-no-prefetch` to a link to exclude it. See https://quartz.jzhao.xyz/features/prefetching
|
||||
|
||||
- 3103485: New `configuration.publishAssets: "referenced"` (default `"all"`): only copy the images, PDFs and other files that published pages link to or embed, so files that only unpublished notes use stay private (#2531, from #2544). References are matched against published (slugified) file names and include `<object data>` SVG embeds, `srcset` and URL-encoded paths.
|
||||
- f768b1e: New `npx quartz info` command: prints the Quartz version (with `git describe`, branch and local changes), Node/npm/OS, the config file, built-ins and every plugin with its version, source and compatibility, as a Markdown block to paste into bug reports. The build banner and `plugin doctor` also show where the checkout is relative to the last release.
|
||||
- 08c2857: New `layout.sidebars` option: how each sidebar handles content taller than the screen. `fit` (default, unchanged) keeps it one screen tall and components shrink and scroll themselves; `scroll` keeps it in view and lets it scroll itself, so nothing is ever out of reach; `static` lets it scroll away with the page. Page types can override it (`byPageType.<type>.sidebars`). New `docs` template for documentation sites (`npx quartz create --template docs`), with both sidebars `static`. Frames receive the modes as a `sidebars` prop and put them on sidebar elements as `data-sidebar-mode`, which plugins can target in CSS.
|
||||
- d66968c: `npx quartz upgrade` shows the release notes of every version between the old and the new Quartz, then runs the new version's checks: it restores plugins, runs `plugin doctor` (plugin entries that are built in now, plugins that don't support the new version …) and lists plugin updates. Plugin install/restore skip plugins that are built into Quartz now, and `plugin doctor --fix` also removes their unused lockfile pins.
|
||||
- fe6a3ea: Pages that page types render from files (`.base`, `.canvas`, Excalidraw drawings) follow the site's publish filters (quartz-community/bases-page#11). The filters see each such page with the frontmatter its page type gives it and `file.data.referencedBy`, the published pages that link to it; a page a filter rejects is not emitted and not listed in the content index, sitemap, RSS, folder pages, explorer or search, and can't be embedded. Before, every such file was published regardless of the filters. New transformer hook `virtualPageHtmlPlugins(ctx, content)`: rehype plugins run on these pages' rendered bodies, which never pass through `htmlPlugins`, so plugins such as encrypted-pages can encrypt them.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ac8cc4b: A plugin that lists a plugin now built into Quartz in `quartz.dependencies` (`@quartz-community/crawl-links`, `remove-draft` or `content-index`) no longer fails the build with "requires crawl-links. Run: npx quartz plugin add …". The built-in (`configuration.links`, `drafts`, `contentIndex`) satisfies the dependency. A warning is shown when that built-in is disabled. `npx quartz plugin doctor` checks the same way.
|
||||
- f8b5638: More build errors caused by content are reported as content problems ("fix the file and build again") instead of "This is likely a Quartz bug": frontmatter that holds a single value or a list instead of properties, Markdown files and assets Quartz can't read (permission denied, a directory named like a note). Plugins can do the same by throwing an `Error` with `quartzContent = true` (see "Reporting problems in content" in Making plugins).
|
||||
- e8a192e: Plugins can declare `window.quartzStaticUrl` and `window.quartzPrefetch` in `capabilities.requires.globals` without a false "nothing provides it" warning: Quartz counts both as its own (`quartzPrefetch` unless `prefetch` is off).
|
||||
- 85d2b43: A plugin whose dependency is configured but disabled gets the intended warning ("depends on X which is disabled") instead of failing the build with "requires X. Run: npx quartz plugin add X".
|
||||
- 28fcb64: When a build stops on an error, Quartz stops esbuild before exiting. esbuild runs as a child process that writes to the same terminal; left running, it could print "fatal error: all goroutines are asleep - deadlock!" and a long goroutine dump after Quartz's error message.
|
||||
- 913f9f0: The folder hierarchy used by folder pages and breadcrumbs now includes the pages of page types that render files (`.base`, `.canvas`, …): folder pages list them, and a folder that holds only such pages has its own node (#2576). Documented that while a page type's `generate` runs, `ctx.virtualPages` holds the virtual pages of the page types before it.
|
||||
- 5507de3: French: "Vue graphique" and "Table des matières" use French capitalisation (jackyzha0/quartz#2513).
|
||||
- 2ef60c6: Embedding a section by the anchor Obsidian writes for its heading works when that anchor differs from the heading's id: `![[note#Colon unspaced]]` now embeds `## Colon:unspaced`. It needs GitHubFlavoredMarkdown 2.1.0 or later, which marks those anchors on the heading.
|
||||
- f768b1e: Layout fixes: the `has-backlinks` condition works, `byPageType.exclude` matches npm plugin sources, layout overrides in `quartz.ts` are applied, `position: footer` is accepted by the config schema, and typos in positions, display values, frames or page types produce a "did you mean" warning instead of silently dropping the component. `quartz build --verbose` prints a layout report.
|
||||
- fc86552: Links as in Obsidian 1.15.0:
|
||||
|
||||
- A Markdown link whose path is not valid percent-encoding (`[x](%zz)`, `[x](a%E2.md)`) is an external link. Before, it failed the whole build with `URI malformed`.
|
||||
- Link paths are NFC-normalized, so a link spelled with a decomposed `é` reaches `café.md`.
|
||||
- An image of a file the site doesn't have, with no alt text, gets its percent-decoded path as alt (`` → “missing pic.png”), as Obsidian names a missing embed.
|
||||
- A wikilink's `^id` no longer names its paragraph (Obsidian Flavored Markdown).
|
||||
|
||||
- 671ca49: Security updates: `sharp` 0.35.5 (GHSA-wq5f-xc86-pv6w), `toml` 5 (prototype pollution and DoS advisories; TOML frontmatter parses the same, and now also accepts plain dates like `date = 2024-01-02`) and `minimatch` 11 (GHSA-g3hv-75wg-m249; `ignorePatterns` match the same). The plugin schema's `layout.position` lists exactly the positions Quartz renders. `npx quartz tui` points to the right install command (`github:quartz-community/tui`).
|
||||
- b7998bb: Pages no longer scroll sideways on phones: long words (a page title such as "ObsidianFlavoredMarkdown", long inline code) break where they don't fit, and the right sidebar's components (graph, backlinks) wrap below each other when they don't fit side by side.
|
||||
- b2da325: Security: frontmatter can no longer run code during a build. A note starting with `---js` or `---javascript` had its frontmatter evaluated as JavaScript (gray-matter's default engine), so building content you didn't write, such as a pull request preview, could run arbitrary code. Quartz now refuses JavaScript frontmatter with an error naming the file. Invalid frontmatter (for example broken YAML) is now reported as a problem in that file instead of as a Quartz bug.
|
||||
- e41ebf6: Plugin option checks use the option schemas first-party plugins ship. These are declared as `quartz.optionSchema`, the name Quartz Syncer reads, as a flat map of option to type (`{ limit: { type: "number" }, mode: { type: "enum", values: [...] } }`). Before, only a JSON Schema in `quartz.configSchema` was read, so no first-party plugin's schema was used. A misspelled option, an enum value that isn't allowed, or a value of the wrong type is now a warning. A value of the same type as the plugin's default is always accepted, even where a schema disagrees.
|
||||
- edb64cd: Tag pages honour the TagPage `numPages` and `sort` options (tag-page 1.0.4); before, they always used the defaults. Plugin client scripts can use `window.quartzStaticUrl` and `window.quartzPrefetch` with the declarations in `@quartz-community/types` 1.3.1.
|
||||
- 28581e8: On Windows, regenerating `.quartz/plugins/index.ts` (`npm run install-plugins`, which also runs before every `npm run build`) no longer skips npm plugins with "dist/index.d.ts could not be found", which left exports such as `ExternalPlugin.Explorer` undefined. The package's location was read from a `file:` URL's pathname (`/C:/…`), which is not a Windows path.
|
||||
- ba5a9a6: Option checks know the FolderPage `prefixFolders`, TagPage `prefixTags` and Latex `customMacros` options (folder-page 1.0.4, tag-page 1.0.5, latex 1.0.2 declare them in their manifests).
|
||||
- e44f2b0: `quartz.ts` overrides (`ExternalPlugin.Explorer({...})`) work for npm plugins and for component plugins (#2565): overrides are registered under the key the loader looks up (the package name for npm plugins), and component constructors re-exported from a plugin's sub-module are wrapped too. The wrapper also returns what the plugin returns, so `ExternalPlugin.X(...)` works both as a statement and as a component in a layout override. `quartz plugin …` commands no longer drop npm plugins from the generated `.quartz/plugins/index.ts`; both generators are now one shared module.
|
||||
- 8854aeb: Plugin fixes for Windows: relative aliases (`./old`, `../x`) redirect to the right page (alias-redirects 1.0.3), and git dates of notes in folders are read from git instead of the filesystem (created-modified-date 1.0.3).
|
||||
- f687f58: Plugins use Quartz's own Preact instead of each bundling a copy, so components can use hooks and context across plugins (a component using `preact/hooks` with another plugin's components crashed), and plugin bundles are smaller. The default plugins and the plugin template are updated; a third-party plugin made from the template before this release still bundles its own copy until it updates its `tsup.config.ts` (see quartz-community/plugin-template).
|
||||
- 2a4ab67: The Roam Research plugin works with ObsidianFlavoredMarkdown on, as in the default config (roam 1.1.0). `{{[[TODO]]}}`, `{{[[DONE]]}}`, `[[>]]` and `{{[[video]]: …}}` no longer render as wikilinks, and `__italic__` is italic instead of bold.
|
||||
- 8eae6a1: Security: plugin commands no longer build shell commands from plugin sources, refs, pinned commits or package names (#2571). git and npm run with argument arrays, refs/commits/URLs/package names are validated (so a value can't be read as an option either), and generated plugin imports are written as escaped string literals. A source such as `github:owner/repo#main;cmd` used to run `cmd`; it is now rejected as an invalid ref. Also fixes restoring a plugin pinned in `quartz.lock.json` to a commit that is no longer its branch tip (#2559).
|
||||
- 3e4a50a: SPA navigation follows redirects correctly: when a link is redirected (for example `folder` → `folder/` on static hosts, or an alias page's canonical link), relative links on the new page resolve against where it really is, and the address bar shows that URL. Links on folder pages and parent tag pages reached through slash-less links pointed one level too high.
|
||||
- 7236249: Sites created with `npx quartz create` from a template (default, blog, docs, obsidian, ttrpg) run GitHubFlavoredMarkdown before ObsidianFlavoredMarkdown (orders 30 and 40), as the default config does and 5.1 requires. The templates still had the old orders (40 and 30). The obsidian and ttrpg templates no longer set `parseArrows`, which ObsidianFlavoredMarkdown doesn't have.
|
||||
- f5ef8f7: A local plugin source written with Windows separators (`.\my-plugin`, `..\plugins\my-plugin`) is recognised as a local path. Before, it was read as a git or npm source and failed with "Expected github:owner/repo".
|
||||
|
||||
Pretty links shorten link text the same way on every OS: Windows also cut it at a backslash (`[[a\b]]` showed `b`).
|
||||
@@ -41,7 +41,7 @@ This question is best answered by tracing what happens when a user (you!) runs `
|
||||
2. The `PageTypeDispatcher` emitter renders the HTML pages (`quartz/plugins/pageTypes/dispatcher.ts`):
|
||||
1. Each page type's `generate` runs, one after another in priority order, and returns virtual pages (folder and tag pages, `.base` and `.canvas` pages, …). They are collected in `ctx.virtualPages`. Pages that stand for a file (page types with `fileExtensions`) first go through the site's filters, with `file.data.referencedBy` set to the pages that link to them.
|
||||
2. The bodies of the virtual pages are rendered (so they can be embedded), and the transformers' `virtualPageHtmlPlugins` run on those of file-backed pages.
|
||||
3. Every content page is rendered by the first page type (highest priority) whose `match` accepts it, and every virtual page by the page type that generated it. Rendering transforms the [hast](https://github.com/syntax-tree/hast) produced in the parse step to JSX using [hast-util-to-jsx-runtime](https://github.com/syntax-tree/hast-util-to-jsx-runtime) with the [Preact](https://preactjs.com/) runtime, applies the page types' `treeTransforms`, assembles the page [[layout]] and [[layout#Page Frames|frame]], and renders the JSX to HTML using [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) (statically: `useState`, `useEffect` and other interactive bits don't run). The bulk of this logic can be found in `quartz/components/renderPage.tsx`.
|
||||
3. Every content page is rendered by the first page type (highest priority) whose `match` accepts it, and every virtual page by the page type that generated it. Rendering transforms the [hast](https://github.com/syntax-tree/hast) produced in the parse step to JSX using [hast-util-to-jsx-runtime](https://github.com/syntax-tree/hast-util-to-jsx-runtime) with the [Preact](https://preactjs.com/) runtime, applies the transformers' `renderTransforms` (`before`), inlines transclusions, applies the page types' `treeTransforms` and the transformers' `renderTransforms` (`after`), assembles the page [[layout]] and [[layout#Page Frames|frame]], and renders the JSX to HTML using [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) (statically: `useState`, `useEffect` and other interactive bits don't run). The bulk of this logic can be found in `quartz/components/renderPage.tsx`.
|
||||
3. The content index is built once from the published and virtual pages (`ctx.contentIndex`), then all other emitters run in parallel over the same content (virtual pages included). The built-in content index emitter writes `static/contentIndex.json`, the sitemap and the RSS feed; plugin emitters write their own files.
|
||||
7. If the `--serve` flag was detected, we also set up another file watcher to detect content changes (only `.md` files). We keep a content map that tracks the parsed AST and plugin data for each slug and update this on file changes. Newly added or modified paths are rebuilt and added to the content map. Then, all the filters and emitters are run over the resulting content map. This file watcher is debounced with a threshold of 250ms. On success, we send a client refresh signal using the passed in callback function.
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ export type QuartzTransformerPluginInstance = {
|
||||
markdownPlugins?: (ctx: BuildCtx) => PluggableList
|
||||
htmlPlugins?: (ctx: BuildCtx) => PluggableList
|
||||
virtualPageHtmlPlugins?: (ctx: BuildCtx, content: ProcessedContent[]) => PluggableList
|
||||
renderTransforms?: (ctx: BuildCtx) => { before?: TreeTransform[]; after?: TreeTransform[] }
|
||||
externalResources?: (ctx: BuildCtx) => Partial<StaticResources> | undefined
|
||||
extendContentIndex?: ContentIndexExtension // any plugin type, see below
|
||||
}
|
||||
@@ -118,6 +119,7 @@ All transformer plugins must define at least a `name` field to register the plug
|
||||
- `markdownPlugins` defines a list of [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md). `remark` is a tool that transforms Markdown to Markdown in a structured way.
|
||||
- `htmlPlugins` defines a list of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md). Similar to how `remark` works, `rehype` is a tool that transforms HTML to HTML in a structured way.
|
||||
- `virtualPageHtmlPlugins` (Quartz 5.1+) defines rehype plugins for the pages that page types render from files (`.base`, `.canvas`, Excalidraw drawings). Those pages are rendered when emitting and never pass through `htmlPlugins`, so a plugin that should also act on them (e.g. encryption) registers its rehype plugin here too. They run on the page's rendered body, with the page's vfile (`file.data.frontmatter`, `file.data.referencedBy`), after the filters published the page; the page then shows the resulting tree. `content` is the published content.
|
||||
- `renderTransforms` (Quartz 5.2+) defines transforms of a page's content tree when the page is rendered, when other pages' content and `allFiles` are available. Each is a function `(root, slug, componentData) => void` that changes `root`, a copy of the page's tree. `before` transforms run before transclusions are inlined and page types' `treeTransforms` run (bases are filled in, for example); `after` transforms run on the finished content. [encrypted-pages](https://github.com/quartz-community/encrypted-pages) uses both: `before` puts its page's content back, `after` encrypts the finished content, transclusions and bases included. Something that only needs the finished content, such as rewriting all links in it, needs only `after`.
|
||||
- `externalResources` defines any external resources the plugin may need to load on the client-side for it to work properly.
|
||||
|
||||
Transformers run in plugin order (see [[plugin manifest#defaultOrder]]); the built-in frontmatter parsing runs at order 0 and the built-in link processing, which sets `file.data.links`, at 60.
|
||||
@@ -554,10 +556,10 @@ export const MyFrame: PageFrame = {
|
||||
`,
|
||||
render({ componentData, pageBody: Content, footer: Footers }: PageFrameProps): unknown {
|
||||
return (
|
||||
<div class="center">
|
||||
<main class="center">
|
||||
{Content(componentData) as ComponentChildren}
|
||||
{Footers.map((Footer) => Footer(componentData) as ComponentChildren)}
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
},
|
||||
}
|
||||
@@ -567,6 +569,7 @@ 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. Note that `footer` is a `QuartzComponent[]` (an array) — frames should iterate over it with `.map()` to render all footer components.
|
||||
- Put the page's content in a `<main>` element (and sidebars in `<aside>`), as the built-in frames do, so screen readers can jump to it.
|
||||
- `css` (optional): Frame-specific CSS. Scope it with `.page[data-frame="my-frame"]` selectors to avoid conflicts.
|
||||
|
||||
**2. Re-export the frame:**
|
||||
|
||||
@@ -65,5 +65,6 @@ Heading ids follow the GitHub rule (`github-slugger`, as `rehype-slug` and the t
|
||||
- `slugHeading(text)`: the id of a heading with this text;
|
||||
- `HeadingSlugger`: slugs all headings of one page in order and numbers repeats (`foo`, `foo-1`, …) — create one per page;
|
||||
- `obsidianHeadingAnchor(text)`: the anchor Obsidian writes for a heading (it replaces `:`, `|`, `^`, `#` and `\` with spaces); slug it with `slugHeading` and add it as an extra id when it differs;
|
||||
- `resolveAnchorHref(href, ids)`: points a same-page `#anchor` at an id that exists on the page (an id as written, a block reference `#^name`, or a heading's text);
|
||||
- `resolveAnchorHref(href, ids)`: points a same-page `#anchor` at an id that exists on the page (an id as written, or a heading's text); a block reference `#^name` always points at the block (`#^name`), never at a heading;
|
||||
- `blockAnchor(name)`: the anchor of the block `^name`, `#^name` (lowercased). Blocks have the id `^name`, so they never share an id with a heading;
|
||||
- `slugTag(tag)`: the slug of a tag, as used for tag pages.
|
||||
@@ -42,7 +42,7 @@ and says whether to update Quartz (`npx quartz upgrade`) or the plugin. If an in
|
||||
|
||||
### For plugin authors
|
||||
|
||||
- Set `quartzVersion` to the **oldest Quartz version your plugin works with**. Raise it when you start using a newer API — for example a plugin that relies on [[built-in processing]] (core-parsed frontmatter, `ctx.contentIndex`, `extendContentIndex`), an async page type `generate`, `virtualPageHtmlPlugins`, `assets` or `window.quartzStaticUrl` needs `">=5.1.0"`. The [plugin template](https://github.com/quartz-community/plugin-template) starts with `">=5.0.0"`.
|
||||
- Set `quartzVersion` to the **oldest Quartz version your plugin works with**. Raise it when you start using a newer API — for example a plugin that relies on [[built-in processing]] (core-parsed frontmatter, `ctx.contentIndex`, `extendContentIndex`), an async page type `generate`, `virtualPageHtmlPlugins`, `assets` or `window.quartzStaticUrl` needs `">=5.1.0"`; one that relies on `renderTransforms` needs `">=5.2.0"` (or treats the hook as optional, as Quartz 5.1 never calls it). The [plugin template](https://github.com/quartz-community/plugin-template) starts with `">=5.0.0"`.
|
||||
- Prefer a lower bound (`>=5.1.0`) over a caret range: minor Quartz releases don't break plugins, so `^5` would only add an upper bound you'd have to bump at every major release. Add an upper bound when you know a major version breaks you.
|
||||
- Raising `quartzVersion` is a breaking change for users on older Quartz versions: release it as a new major (or at least minor) version of your plugin and say so in its changelog.
|
||||
- Pre-releases count: Quartz `5.2.0-beta.1` satisfies `>=5.1.0`.
|
||||
|
||||
@@ -11,6 +11,7 @@ The `build` command transforms your Markdown content into a static HTML website.
|
||||
| Flag | Shorthand | Description | Default |
|
||||
| ----------------- | --------- | ---------------------------------------------------------------------------------- | ------------------ |
|
||||
| `--directory` | `-d` | The content folder | `content` |
|
||||
| `--config` | `-C` | Path to the config file to load (see [[#Custom config file]]) | quartz.config.yaml |
|
||||
| `--verbose` | `-v` | Print detailed build information (see [[#Verbose output]]) | `false` |
|
||||
| `--output` | `-o` | The directory where the built site will be saved | `public` |
|
||||
| `--serve` | | Start a local development server | `false` |
|
||||
@@ -56,6 +57,17 @@ If you have a very large vault, you can limit the number of concurrent workers t
|
||||
npx quartz build --concurrency 2
|
||||
```
|
||||
|
||||
### Custom config file
|
||||
|
||||
By default Quartz loads `quartz.config.yaml` from the current working directory. Use `--config` (or `-C`) to point at a config file elsewhere — for example when the config lives alongside your content rather than inside the Quartz install.
|
||||
|
||||
```shell
|
||||
npx quartz build --config ../my-vault/quartz.config.yaml
|
||||
```
|
||||
|
||||
> [!note]
|
||||
> The shorthand for `--config` is an uppercase `-C`. A lowercase `-c` is the shorthand for `--concurrency`, so the two are distinct.
|
||||
|
||||
### Verbose output
|
||||
|
||||
`npx quartz build --verbose` also prints:
|
||||
|
||||
+54
-2
@@ -23,6 +23,39 @@ layout:
|
||||
|
||||
`configuration` and `plugins` are described below; the `layout` section (component groups, `byPageType` overrides, sidebar modes) is described in [[layout]].
|
||||
|
||||
## Extending the default configuration
|
||||
|
||||
Without a `quartz.config.yaml`, Quartz uses `quartz.config.default.yaml`. A `quartz.config.yaml` normally replaces it completely. With `extends`, your file can hold just the changes you make to another configuration instead:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
extends: default # quartz.config.default.yaml
|
||||
configuration:
|
||||
pageTitle: "My Site"
|
||||
baseUrl: example.com
|
||||
plugins:
|
||||
- source: "@quartz-community/graph"
|
||||
enabled: false # turn off a default plugin
|
||||
- source: "@quartz-community/explorer"
|
||||
options:
|
||||
folderDefaultState: open # only this option changes
|
||||
- source: github:me/my-plugin # a plugin the defaults don't have
|
||||
enabled: true
|
||||
```
|
||||
|
||||
- `extends` is `default`, a path to another config file relative to this one (which may itself extend another), an `https://` URL, or a list of those. An empty file (or one with only comments) is an empty config, and `extends: []` extends nothing.
|
||||
- A list stacks presets: each file in it adds its own changes. Quartz puts every file of the `extends` chain in one line and applies each once, its bases before it: the list's entries in order, each after the bases it extends, and your file last. A base that several entries share (usually `default`) is applied once, at its first appearance. So with `extends: [./a.yaml, ./b.yaml]`, where both extend `default`, the order is `default` → `a.yaml` → `b.yaml` → your file: what `a.yaml` changes stays unless `b.yaml` changes the same thing (later entries win), and your file wins over both. An entry that doesn't extend the shared base is applied before it if it comes first, so the base's settings win over it; make such a preset extend `default` too, or list it after the others.
|
||||
- A URL is fetched when the config is loaded (10 s timeout, at most 1 MB) and kept in `.quartz-cache/extends/`. If a later fetch fails (offline, timeout, HTTP error), Quartz uses the cached copy and warns; without one, the build stops. `QUARTZ_EXTENDS_OFFLINE=1` uses only the cached copy. Relative `extends` inside a fetched file are resolved against its URL; `default` always means your local `quartz.config.default.yaml`. Only `https://` URLs are allowed, and only extend configs you trust: they choose which plugins your build runs.
|
||||
- `configuration` and `layout` merge key by key, including nested objects (`theme.colors.lightMode.secondary` changes only that colour). Any other value replaces the default: strings, numbers and lists such as `ignorePatterns` or `byPageType.<type>.exclude`. Setting a key to `null` removes it, so the built-in default applies.
|
||||
- A plugin entry changes the default entry for the same plugin, matched by name (`github:quartz-community/explorer` matches `@quartz-community/explorer`, and a fork with the same name replaces it). A source with a `name` matches by that name; a source with a `subdir` and no `name` matches by repository and folder, so two plugins of one repository stay separate. `enabled`, `order` and `source` replace the default values. `options` and `layout` merge like `configuration`, and `null` drops them so the plugin's own defaults apply. A plugin that is not in the base is added, and it needs `enabled: true` just as in a full config.
|
||||
- Plugins run in `order` as before. Your file can change a default plugin's `order`. Where two plugins have the same order, the base config's list order decides, and added plugins come last.
|
||||
- Your updates to `quartz.config.default.yaml` (for example after `npx quartz upgrade`) reach your site without copying them over.
|
||||
|
||||
- `npx quartz build --serve` also rebuilds when a local file your config extends changes.
|
||||
- `npx quartz plugin` commands and `npx quartz info` read the merged configuration, as the build does: `plugin list`, `status`, `doctor`, `install` and `prune` see the plugins your bases configure. Commands that change plugins only ever write your own file, never the merged result: `enable`, `disable` and `config --set` add or change your entry for the plugin (`- source: …` with just that change), `config --unset` removes your value and, when a base sets the option, sets it to `null` so the plugin's default applies, and `add` appends a full entry. `remove` refuses a plugin that a base configures (it can't be removed from your file); disable it instead.
|
||||
|
||||
> [!warning] Experimental
|
||||
> `extends` is experimental: the merge rules may still change.
|
||||
|
||||
## General Configuration
|
||||
|
||||
This part of the configuration concerns anything that can affect the whole site. The following is a list breaking down all the things you can configure:
|
||||
@@ -54,6 +87,11 @@ This part of the configuration concerns anything that can affect the whole site.
|
||||
- `"all"` (default): every file that isn't ignored.
|
||||
- `"referenced"`: only files a published page links to or embeds. Use this with [[ExplicitPublish]] or [[private pages|drafts]], so that files only unpublished notes use stay private.
|
||||
- Files that Quartz renders as pages themselves (e.g. `.base` and `.canvas` files) are never copied as raw assets.
|
||||
- `slugs`: how file paths become URLs.
|
||||
- `stripDiacritics`: `true` strips accents and other diacritics from page, folder and file URLs, e.g. `české/čeština.md` is published at `/ceske/cestina` instead of `/české/čeština` (which browsers show as `%C4%8Desk%C3%A9/...` when copied). Off by default.
|
||||
- Links keep working as written in your notes: `[[čeština]]`, `[[české/čeština#Nadpis]]` and embeds like `![[obrázek.png]]` resolve to the stripped addresses. Aliases and `permalink`s are stripped the same way. Heading anchors (`#Nadpis`) keep their diacritics. Tag pages and the pages plugins generate from files (canvas, bases, …) are stripped too with `@quartz-community/utils` 1.3 or newer; with older versions they keep their diacritics.
|
||||
- Only Latin letters change: they lose their accents (`á č é ů …`), and Latin letters without a decomposition fold to ASCII (`ł` → `l`, `ø` → `o`, `ß` → `ss`, `æ` → `ae`). Other scripts (Chinese, Japanese, Korean, Greek, Cyrillic, Arabic, Hebrew, Devanagari, …) are left as written, marks included.
|
||||
- Turning it on changes the URLs of existing pages. Quartz writes a redirect from each page's, folder's and alias's old address (the slug with its diacritics) to the new one, so links shared elsewhere keep working. Old `permalink` addresses are not redirected; add them as `aliases` if they need to keep working.
|
||||
- `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.
|
||||
- `theme`: configure how the site looks.
|
||||
- `fontOrigin`: where to load fonts from.
|
||||
@@ -68,7 +106,7 @@ This part of the configuration concerns anything that can affect the whole site.
|
||||
}
|
||||
```
|
||||
|
||||
Use a path relative to the site root like above (no leading `/`) so it also works when the site is served from a subpath. To have Quartz download Google Fonts at build time and serve them from your site instead, use the [[plugins/Fonts|Fonts]] plugin with `fontOrigin: selfHosted`.
|
||||
Use a path relative to the site root like above (no leading `/`) so it also works when the site is served from a subpath. To have Quartz download Google Fonts at build time and serve them from your site instead, set `configuration.fonts.fontOrigin: selfHosted` (see [[plugins/Fonts|Fonts]]).
|
||||
- `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)
|
||||
@@ -133,6 +171,20 @@ plugins:
|
||||
|
||||
Plugins are categorized by their type (transformer, filter, emitter, pageType) based on their manifest. The `order` field controls execution order within each category.
|
||||
|
||||
`before` and `after` name plugins that this one must run before or after (one name or a list; `obsidian-flavored-markdown`, `ObsidianFlavoredMarkdown` and `@quartz-community/obsidian-flavored-markdown` all work, as do the built-ins `frontmatter`, `links`, `drafts` and `contentIndex`; the names of the plugins they replaced, `crawl-links`, `remove-draft` and `content-index`, mean those built-ins). They never override `order`; they are checked against it:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: github:me/my-transformer
|
||||
enabled: true
|
||||
order: 45
|
||||
after: obsidian-flavored-markdown # needs the links OFM creates
|
||||
```
|
||||
|
||||
- Between plugins with the same `order`, `before`/`after` decide the order (otherwise the list order does).
|
||||
- If `order` contradicts a constraint (here: OFM moved to order 50), the build stops with an error that names both orders, instead of silently running the plugins the wrong way round.
|
||||
- A name that isn't in your config is an error. A plugin that is disabled, or runs in another category (a filter named by a transformer), is skipped: the constraint applies only where both plugins run.
|
||||
|
||||
> [!note]
|
||||
> For advanced TS override of plugin configuration, you can modify `quartz.ts`:
|
||||
>
|
||||
@@ -362,4 +414,4 @@ 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.
|
||||
> For per-heading fonts and self-hosted fonts, see [[plugins/Fonts|Fonts]] (`configuration.fonts`). With `fontOrigin: selfHosted`, Quartz downloads Google Fonts at build time and serves them from your site, making it fully self-contained.
|
||||
@@ -6,7 +6,7 @@ tags:
|
||||
|
||||
Quartz supports [Mermaid](https://mermaid.js.org) for diagrams and charts in your notes (flow charts, sequence diagrams, timelines, and so on). This is part of [[Obsidian compatibility]] and can be turned on or off on that plugin.
|
||||
|
||||
Default renderer is Mermaid.js. Set `diagramRenderer: pele` on [[ObsidianFlavoredMarkdown]] to use [Pele](https://pele.run) instead. Mermaid.js is deprecated; Pele will become the default later.
|
||||
Diagrams are drawn with [Pele](https://pele.run), as in Obsidian 1.15 (since [[ObsidianFlavoredMarkdown]] 2.4 / Quartz 5.3), inside a `<div class="mermaid">`. Set `diagramRenderer: mermaid` on ObsidianFlavoredMarkdown to use the deprecated Mermaid.js instead.
|
||||
|
||||
> [!note]
|
||||
> In the default config [[ObsidianFlavoredMarkdown]] (`order: 40`) runs after [[SyntaxHighlighting]] (`order: 20`). If Mermaid diagrams don't show up and you changed either `order`, restore that sequence.
|
||||
@@ -16,7 +16,7 @@ plugins:
|
||||
- source: "@quartz-community/obsidian-flavored-markdown"
|
||||
options:
|
||||
mermaid: true
|
||||
diagramRenderer: pele # default: mermaid
|
||||
diagramRenderer: pele # or mermaid (deprecated)
|
||||
```
|
||||
|
||||
Both renderers only load on pages that contain a Mermaid diagram. Pele is served from your own site (Quartz 5.1+) and only downloads the code for the diagram types on the page; on older Quartz versions it is loaded from jsDelivr. Mermaid.js is always loaded from a CDN.
|
||||
|
||||
@@ -15,4 +15,6 @@ Under the hood, this is done by hijacking page navigations and instead fetching
|
||||
|
||||
Pages are fetched ahead of a click by [[prefetching]], which the router uses to show them at once; the fetched pages are also reused by [[popover previews]].
|
||||
|
||||
Back and Forward return to where you were on each page: the router keeps each history entry's scroll position and restores it after the page is swapped in, and a reload keeps it too. Links to a heading on the same page add a history entry and only scroll, so Back returns to where you clicked.
|
||||
|
||||
Redirects are followed: when a link is redirected (for example `folder` → `folder/` on static hosts, or an alias page to its canonical page), the address bar shows the final URL and relative links on the new page resolve against it.
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Built-in processing
|
||||
description: Frontmatter parsing, link resolution, drafts and the content index are part of Quartz itself.
|
||||
description: Frontmatter parsing, link resolution, drafts, the content index and font loading are part of Quartz itself.
|
||||
tags:
|
||||
- feature
|
||||
---
|
||||
@@ -13,6 +13,7 @@ Some processing steps are needed by every Quartz site. They are built into Quart
|
||||
| [[CrawlLinks\|links]] | `configuration.links` | Makes internal links relative, classifies links, records outgoing links for backlinks and graph | `crawl-links` |
|
||||
| [[RemoveDrafts\|drafts]] | `configuration.drafts` | Does not publish pages with `draft: true` | `remove-draft` |
|
||||
| [[ContentIndex\|contentIndex]] | `configuration.contentIndex` | Emits `static/contentIndex.json` (search, explorer, graph, …), `sitemap.xml` and the RSS feed | `content-index` |
|
||||
| [[Fonts\|fonts]] | `configuration.fonts` | Loads fonts (Google Fonts, self-hosted or local), per-heading fonts, theme font handling | `quartz-fonts` |
|
||||
|
||||
Without them a site would silently break: pages titled "Untitled", links that 404 on nested pages, empty backlinks and graph, drafts published, no search.
|
||||
|
||||
@@ -32,7 +33,7 @@ configuration:
|
||||
openLinksInNewTab: false
|
||||
lazyLoad: false
|
||||
externalLinkIcon: true
|
||||
disableBrokenWikilinks: false
|
||||
disableBrokenWikilinks: true
|
||||
drafts:
|
||||
publish: false # true = publish drafts anyway (e.g. preview deployments)
|
||||
contentIndex:
|
||||
@@ -42,6 +43,9 @@ configuration:
|
||||
rssFullHtml: false
|
||||
rssSlug: index
|
||||
includeEmptyFiles: true
|
||||
fonts:
|
||||
fontOrigin: googleFonts # googleFonts | selfHosted | local
|
||||
h1: Playfair Display # per-heading fonts; title/header/body/code override theme.typography
|
||||
```
|
||||
|
||||
Each built-in also accepts:
|
||||
@@ -49,17 +53,18 @@ Each built-in also accepts:
|
||||
- `enabled: false` (or the shorthand `links: false`) to turn it off;
|
||||
- `order` to change where it runs relative to plugins of the same kind (frontmatter runs at `0`, links at `60`, the same scale as plugin `order`).
|
||||
|
||||
See the individual pages for every option: [[Frontmatter]], [[CrawlLinks]], [[RemoveDrafts]], [[ContentIndex]].
|
||||
See the individual pages for every option: [[Frontmatter]], [[CrawlLinks]], [[RemoveDrafts]], [[ContentIndex]], [[Fonts]].
|
||||
|
||||
## Replacing a built-in
|
||||
|
||||
A plugin can take over a built-in by declaring that it provides the same thing in its [[plugin capabilities|capabilities]] (`package.json` → `quartz.capabilities.provides`):
|
||||
|
||||
| Built-in | Replaced by a plugin that provides |
|
||||
| ------------ | ------------------------------------- |
|
||||
| frontmatter | `data: ["frontmatter"]` |
|
||||
| links | `data: ["links"]` |
|
||||
| contentIndex | `files: ["static/contentIndex.json"]` |
|
||||
| Built-in | Replaced by a plugin that provides |
|
||||
| ------------ | ------------------------------------------ |
|
||||
| frontmatter | `data: ["frontmatter"]` |
|
||||
| links | `data: ["links"]` |
|
||||
| contentIndex | `files: ["static/contentIndex.json"]` |
|
||||
| fonts | `files: ["static/fonts/quartz-fonts.css"]` |
|
||||
|
||||
When such a plugin is enabled, the built-in steps aside (`quartz build --verbose` shows `off — replaced by plugin "…"`). Set `enabled: true` on the built-in to run both.
|
||||
|
||||
@@ -67,7 +72,7 @@ Drafts can't be replaced: a filter plugin runs in addition to the built-in.
|
||||
|
||||
## Upgrading from the plugins
|
||||
|
||||
Existing `quartz.config.yaml` files keep working: entries for `@quartz-community/crawl-links`, `@quartz-community/remove-draft` and `@quartz-community/content-index` are applied to the matching built-in (options, `order` and `enabled: false` carry over) and the packages are no longer loaded. The build prints a notice for each.
|
||||
Existing `quartz.config.yaml` files keep working: entries for `@quartz-community/crawl-links`, `@quartz-community/remove-draft`, `@quartz-community/content-index` and (since 5.2) `@quartz-community/quartz-fonts` are applied to the matching built-in (options, `order` and `enabled: false` carry over) and the packages are no longer loaded. The build prints a notice for each.
|
||||
|
||||
To update the file, run:
|
||||
|
||||
@@ -85,6 +90,6 @@ The [[Frontmatter#Properties panel|properties panel]] is still a plugin (`note-p
|
||||
## For plugin authors
|
||||
|
||||
- The data the built-ins produce is unchanged: `file.data.frontmatter`, `aliases`, `frontmatterLinks`, `links`, and the same `contentIndex.json` format. Plugins that read them need no changes.
|
||||
- Built-ins count as providers for [[plugin capabilities]], so a requirement such as `requires: { data: ["links"] }` is satisfied without any plugin. Built-in links also provides the classes it puts on links: `.internal`, `.external` and `.broken` (`dom` capabilities). In `from`, name the built-ins `quartz:frontmatter`, `quartz:links`, `quartz:drafts` and `quartz:contentIndex`.
|
||||
- Built-ins count as providers for [[plugin capabilities]], so a requirement such as `requires: { data: ["links"] }` is satisfied without any plugin. Built-in links also provides the classes it puts on links: `.internal`, `.external` and `.broken` (`dom` capabilities). In `from`, name the built-ins `quartz:frontmatter`, `quartz:links`, `quartz:drafts`, `quartz:contentIndex` and `quartz:fonts`.
|
||||
- Don't list `@quartz-community/crawl-links`, `remove-draft` or `content-index` in your manifest's [[plugin manifest#dependencies|`dependencies`]]: Quartz 5.1 treats them as satisfied by the built-ins, but Quartz 5.0 fails the build when the plugin isn't in the config. To run after built-in links, set a `defaultOrder` above 60 (a transformer with a lower order that depends on `crawl-links` fails the build).
|
||||
- Plugins can add their own fields to `contentIndex.json` — see [[making plugins#Extending the content index]].
|
||||
@@ -59,7 +59,70 @@ plugins:
|
||||
priority: 50
|
||||
```
|
||||
|
||||
For advanced options like custom sort, filter, and map functions, use the TS override in `quartz.ts`:
|
||||
### Sorting
|
||||
|
||||
`sort` is a list of rules. Each folder's entries are sorted by the first rule; entries it considers equal are sorted by the next one, and so on. A rule is `{ by: <key>, direction: asc | desc }` (`direction` defaults to `asc`), or just the key. As in [[Bases]] views, `direction` may also be written `ASC` / `DESC`, and `by` as `property`.
|
||||
|
||||
| `by` | Sorts by |
|
||||
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `folder` | Folders before files (`desc`: files before folders) |
|
||||
| `title` | The displayed name (the page title), in natural order: `Note 2` before `Note 10`, case-insensitive |
|
||||
| `name` | The file or folder name, whatever the title or `mapFn` (e.g. numbered names: `10 Research`) |
|
||||
| `date` | The page's date, as `defaultDateType` picks it (created, modified or published). A folder's date is its index page's date when that page sets one in its frontmatter, else the date of its newest page |
|
||||
| `tag` | The page's tags in the order they are written: first tags compared, then second tags when those are equal, and so on. With `firstTagOnly: true`, only the first tags |
|
||||
|
||||
Entries without a date or tags come after the others, in either direction. The default is `[folder, title]`. Newest first, folders still on top:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: "@quartz-community/explorer"
|
||||
enabled: true
|
||||
options:
|
||||
sort:
|
||||
- folder
|
||||
- { by: date, direction: desc }
|
||||
- title
|
||||
```
|
||||
|
||||
Grouped by first tag, newest first within a tag:
|
||||
|
||||
```yaml
|
||||
sort:
|
||||
- by: tag
|
||||
firstTagOnly: true
|
||||
- by: date
|
||||
direction: desc
|
||||
```
|
||||
|
||||
A `sortFn` set in `quartz.ts` replaces `sort`. Sorting runs at the `sort` step of `order`, so with the default order it sees the names `mapFn` set. `order: [filter, sort, map]` sorts by the original names, for example to strip [Johnny.Decimal](https://johnnydecimal.com/) prefixes in `mapFn` while keeping the numbered order.
|
||||
|
||||
### Several explorers
|
||||
|
||||
List the plugin once per explorer, each entry with its own options and layout. `rootFolder` shows only one folder's contents (a folder path as in your vault, or its slug):
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: "@quartz-community/explorer"
|
||||
enabled: true
|
||||
layout:
|
||||
position: left
|
||||
priority: 50
|
||||
- source: "@quartz-community/explorer"
|
||||
enabled: true
|
||||
options:
|
||||
title: Notes
|
||||
rootFolder: Notes/Daily Notes
|
||||
layout:
|
||||
position: left
|
||||
priority: 55
|
||||
display: desktop-only # one menu button on phones
|
||||
```
|
||||
|
||||
Opened folders are remembered per folder, so a folder shown in both explorers is open or closed in both; scroll positions are kept per explorer. Options set in a TypeScript override apply to every entry.
|
||||
|
||||
### Custom functions
|
||||
|
||||
For custom sort, filter, and map functions, use the TS override in `quartz.ts`:
|
||||
|
||||
```ts title="quartz.ts"
|
||||
import { loadQuartzConfig, loadQuartzLayout } from "./quartz/plugins/loader/config-loader"
|
||||
@@ -100,7 +163,8 @@ Want to customize it even more?
|
||||
|
||||
- Removing explorer: remove the `explorer` entry from `quartz.config.yaml` or set `enabled: false`
|
||||
- (optional): After removing the explorer component, you can move the [[table of contents | Table of Contents]] component back to the `left` part of the layout
|
||||
- Changing `sort`, `filter` and `map` behavior: explained in [[#Advanced customization]]
|
||||
- Changing the sort order: [[#Sorting]]
|
||||
- Custom `sort`, `filter` and `map` functions: explained in [[#Advanced customization]]
|
||||
|
||||
## Advanced customization
|
||||
|
||||
@@ -122,9 +186,13 @@ export type ContentDetails = {
|
||||
links: SimpleSlug[]
|
||||
tags: string[]
|
||||
content: string
|
||||
date?: string // ISO 8601, the date `defaultDateType` picks (Quartz 5.3+)
|
||||
dateFromFrontmatter?: true // the date is set in the page's frontmatter (Quartz 5.3+)
|
||||
}
|
||||
```
|
||||
|
||||
To sort by date, use `sort: [{ by: date, direction: desc }]` (see [[#Sorting]]), or compare `a.data?.date` in a `sortFn`.
|
||||
|
||||
Every function you can pass is optional. By default, only a `sort` function will be used:
|
||||
|
||||
```ts title="Default sort function"
|
||||
@@ -167,24 +235,25 @@ These examples show the basic usage of `sort`, `map` and `filter`.
|
||||
|
||||
### Use `sort` to put files first
|
||||
|
||||
Using this example, the explorer will alphabetically sort everything.
|
||||
Files before folders, everything by title:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: "@quartz-community/explorer"
|
||||
enabled: true
|
||||
options:
|
||||
# Simple options go in YAML
|
||||
title: Explorer
|
||||
folderDefaultState: collapsed
|
||||
sort:
|
||||
- { by: folder, direction: desc }
|
||||
- title
|
||||
```
|
||||
|
||||
Custom sort functions require the TS override:
|
||||
The same with a sort function in the TS override:
|
||||
|
||||
```ts title="quartz.ts (override)"
|
||||
ExternalPlugin.Explorer({
|
||||
sortFn: (a, b) => {
|
||||
return a.displayName.localeCompare(b.displayName)
|
||||
if (a.isFolder === b.isFolder) return a.displayName.localeCompare(b.displayName)
|
||||
return a.isFolder ? 1 : -1
|
||||
},
|
||||
})
|
||||
```
|
||||
@@ -203,7 +272,7 @@ ExternalPlugin.Explorer({
|
||||
```
|
||||
|
||||
> [!note]
|
||||
> The `mapFn`, `filterFn`, and `sortFn` options require JavaScript callback functions and cannot be expressed in YAML. Use the TS override for these.
|
||||
> The `mapFn`, `filterFn`, and `sortFn` options require JavaScript callback functions and cannot be expressed in YAML. Use the TS override for these. Sorting by folder, title, name, date or tag needs no code: see [[#Sorting]].
|
||||
|
||||
### Remove list of elements (`filter`)
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ This guide walks you through setting up Quartz from scratch. If you already ran
|
||||
|
||||
You need these tools installed before continuing:
|
||||
|
||||
- **[Node.js](https://nodejs.org/) v22 or later** (run `node -v` to check)
|
||||
- **[Node.js](https://nodejs.org/) v22.22 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.
|
||||
> - **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.22 or later.
|
||||
> - **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.
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ cd quartz
|
||||
## 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.
|
||||
> Quartz requires **Node.js 22.22** or later. Check your version with `node -v` and upgrade at [nodejs.org](https://nodejs.org/) if needed.
|
||||
|
||||
```bash
|
||||
npm i
|
||||
|
||||
@@ -28,6 +28,69 @@ npx quartz plugin install --latest
|
||||
|
||||
See the [[upgrade|CLI reference for upgrade]] for more details on available flags.
|
||||
|
||||
## Upgrading from 5.2 to 5.3
|
||||
|
||||
Quartz 5.3 needs **Node.js 22.22 or later**. Then upgrade as usual:
|
||||
|
||||
```bash
|
||||
npx quartz upgrade
|
||||
npx quartz plugin install --latest
|
||||
```
|
||||
|
||||
### Changes you may notice
|
||||
|
||||
- **Block anchors**: a block's id is now `^id` and links to it are `#^id` (`[[note#^para-1]]` → `note#^para-1`, was `note#para-1`), as in Obsidian, where blocks and headings are separate namespaces: block `^para-1` and heading `## Para 1` no longer share an id, so `[[#^para-1]]` and `[[#Para 1]]` each land on their own target. Links inside the site are regenerated; old `#id` URLs of blocks from outside the site now go to the top of the page (or to a heading of that name). CSS or scripts that select a block by id need `#\^para-1` (or `getElementById`).
|
||||
- **Unresolved links**: `configuration.links.disableBrokenWikilinks` is now on by default. Links to pages that don't exist get the `broken` class and are styled as unresolved, as in Obsidian. Links to pages a filter removes (drafts, unpublished notes) are marked the same way, with `data-filtered="<filter>"`. Set `links.disableBrokenWikilinks: false` to style them as before.
|
||||
- **Mermaid diagrams** render with [Pele](https://pele.run) by default, as in Obsidian, inside a `<div class="mermaid">` rather than a code block. Set `diagramRenderer: mermaid` on [[ObsidianFlavoredMarkdown]] to keep Mermaid.js. See [[Mermaid diagrams]].
|
||||
- **Block wrappers**: each top-level block of a note is wrapped in the `div` Obsidian puts it in (`div.el-p > p`, `div.el-h2 > h2`). Custom CSS that selects a page's blocks as direct children (`article > p`) no longer matches. Select them without `>`, or set `blockWrappers: false` on ObsidianFlavoredMarkdown.
|
||||
- **Transclusions** use Obsidian's embed markup: the title of a whole-note embed is a `div.markdown-embed-title` (it was an `h1`), and the content is in `div.markdown-embed-content`. It looks the same without a theme. Custom CSS for transclusions may need new selectors.
|
||||
- **Page structure**: the centre column is a `<main>` (it was a `div`; the `center` class is unchanged) and the default frame's sidebars are `<aside>` elements. Page listings use `h2` titles (they were `h3`) at the same size. Footnote links keep the `internal` class but no longer have `internal-link`.
|
||||
- **Colours**: the templates' `gray` and `tertiary` colours meet WCAG AA contrast. Your site keeps the colours in its own `quartz.config.yaml`. To adopt the new ones, set them under `configuration.theme.colors`:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
configuration:
|
||||
theme:
|
||||
colors:
|
||||
lightMode:
|
||||
gray: "#727272" # was #b8b8b8
|
||||
tertiary: "#587971" # was #84a59d
|
||||
darkMode:
|
||||
gray: "#7f7f7f" # was #646464
|
||||
```
|
||||
|
||||
- **Folding**: the `obsidian` template folds headings and lists. Other sites can turn it on with `foldHeadings` and `foldLists` on ObsidianFlavoredMarkdown.
|
||||
- **Stylesheets**: component styles are one `component-<hash>.css` file instead of one per component. The styles are unchanged.
|
||||
- **Frontmatter** is read as YAML 1.2. Frontmatter with only comments has no properties, as in Obsidian, instead of being reported as invalid.
|
||||
- **Custom TypeScript**: type checking (`npm run check`) uses TypeScript 7 with `moduleResolution: bundler`. Code that imports a package's internal files may need to import from the package itself.
|
||||
|
||||
### New options
|
||||
|
||||
- `extends` (experimental) and `before`/`after` on plugin entries. See [[configuration#Extending the default configuration]].
|
||||
- `configuration.slugs.stripDiacritics`. See [[configuration#General Configuration]].
|
||||
- The layout conditions `is-index`, `is-folder-index` and `not-<condition>`. See [[layout#Conditional Rendering]].
|
||||
- [[plugins/Explorer|Explorer]]: `sort`, `rootFolder`, and `order` in YAML. [[GitHubFlavoredMarkdown]]: `singleTilde`, `replacements`. [[ObsidianFlavoredMarkdown]]: `math`, `markdownEmbeds`, `blockWrappers`, `foldHeadings`, `foldLists`. [[CanvasPage]]: `wheelBehavior`, `textNodeMarkdown`.
|
||||
|
||||
See [[whats-new#New in 5.3|What's new in 5.3]] for everything else.
|
||||
|
||||
## Upgrading from 5.1 to 5.2
|
||||
|
||||
```bash
|
||||
npx quartz upgrade
|
||||
npx quartz plugin doctor --fix
|
||||
```
|
||||
|
||||
`--fix` moves the Fonts plugin's entry (`@quartz-community/quartz-fonts`) into `configuration.fonts`, now that font loading is built in. Until you run it, the entry keeps working and is applied automatically.
|
||||
|
||||
### Changes you may notice
|
||||
|
||||
- **Themes**: [[ThemesCore]] 3 converts Obsidian themes at build time, so the `@quartz-themes/<theme>` packages are no longer needed. Theme ids from 2.x (`tokyo-night`) keep working. The `aspects`, `include`, `calloutStyle` and `fonts` options were removed.
|
||||
- **Callouts and transclusions** render as `<div>` elements, as in Obsidian (callouts were `<blockquote>`). Callout titles are in `.callout-title-inner` without a `<p>`. Custom CSS for either may need new selectors.
|
||||
- **Bases** columns are labelled with the property's name (`priority`, `file name`) instead of title case (`Priority`, `Name`). Set `propertyLabels: title` on [[BasesPage]] for the old labels.
|
||||
- **Permalinks** with `.` or `..` segments are ignored with a warning.
|
||||
- **Fonts**: configured `body`, `code` and `interface` fonts now apply under an Obsidian theme, and the interface and heading fonts are loaded from Google Fonts like the others.
|
||||
|
||||
See [[whats-new#New in 5.2|What's new in 5.2]] for everything else.
|
||||
|
||||
## Upgrading from 5.0 to 5.1
|
||||
|
||||
Run the upgrade, then let `plugin doctor` update your config:
|
||||
|
||||
@@ -7,6 +7,36 @@ aliases:
|
||||
|
||||
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.
|
||||
|
||||
## New in 5.3
|
||||
|
||||
Upgrading from 5.2? See [[upgrading#Upgrading from 5.2 to 5.3|Upgrading from 5.2 to 5.3]] for the changes you may notice.
|
||||
|
||||
- **Accessibility** — the templates' colours meet WCAG AA contrast, and so does text in the table of contents, footer, folder and tag listings, search button and Bases group headings. The centre column is a `<main>` and the sidebars are `<aside>` elements, page listings no longer skip heading levels, and ARIA attributes and ids are valid in the table of contents, explorer, backlinks, heading anchors and Bases views.
|
||||
- **Faster pages** — component styles are one stylesheet (about 20 fewer render-blocking requests per page), the [[graph view]] loads d3 and PixiJS only when it is shown and opens five times faster on large sites, and KaTeX's stylesheet no longer blocks pages without math.
|
||||
- **Back and Forward** — with [[SPA Routing]], Back and Forward return to where you were on each page, and moving between headings of the same page only scrolls.
|
||||
- **Markup as in Obsidian** — [[ObsidianFlavoredMarkdown]] wraps each top-level block in Obsidian's `div.el-*` wrappers, renders [[Mermaid diagrams]] with Pele by default, and can fold headings and lists (`foldHeadings`, `foldLists`; on in the `obsidian` template). Transclusions use Obsidian's embed markup, a missing attachment reads "could not be found", and notes embedded with a Markdown link (``) are transcluded. Obsidian themes ([[ThemesCore]] 3.2) style all of these.
|
||||
- **Unresolved links** — links to pages that don't exist, or that a filter removed (drafts, [[ExplicitPublish]]), get the `broken` class, as Obsidian marks unresolved links (`links.disableBrokenWikilinks` is on by default). See [[CrawlLinks]].
|
||||
- **Extending a configuration** (experimental) — `extends: default` in `quartz.config.yaml` keeps only your changes to the default configuration; it also takes a path or an `https://` URL. Several presets can be listed and stack. Plugin entries can declare `before:` / `after:` other plugins. See [[configuration#Extending the default configuration]].
|
||||
- **Slugs without accents** — `configuration.slugs.stripDiacritics` publishes `české/čeština.md` at `/ceske/cestina` and `Łódź.md` at `/lodz`, so URLs in Latin-script languages need no percent-encoding; other scripts are left as written. See [[configuration#General Configuration]].
|
||||
- **Layout conditions** — `is-index` (home page), `is-folder-index`, and `not-<condition>` for any condition (`not-has-tags`). See [[layout#Conditional Rendering]].
|
||||
- **Explorer** 1.2 — sort from YAML with rules applied in sequence (`sort: [folder, { by: date, direction: desc }]`), several explorers on a page (`rootFolder`), and `order` in YAML. See [[plugins/Explorer|Explorer]].
|
||||
- **Plugin options** — [[GitHubFlavoredMarkdown]]: `singleTilde` and `replacements` (for example Quartz 4's arrows); [[ObsidianFlavoredMarkdown]]: `math`; [[CanvasPage]]: the wheel and trackpad pan the canvas as in Obsidian, and text nodes render with the site's Markdown plugins (Mermaid, callouts, math).
|
||||
- **Link previews and search engines** — each page has a canonical link, and `og:url`, `og:type` and the article times are set as Open Graph readers expect.
|
||||
- **Content index** — `contentIndex.json` entries carry the page's `date`, for client-side components such as the explorer.
|
||||
- **Releases** — release tags are verified on GitHub, and each release publishes a versioned Docker image.
|
||||
|
||||
## New in 5.2
|
||||
|
||||
Upgrading from 5.1? See [[upgrading#Upgrading from 5.1 to 5.2|Upgrading from 5.1 to 5.2]].
|
||||
|
||||
- **Obsidian themes** — [[ThemesCore]] 3.1 converts any Obsidian community theme at build time: name it as Obsidian lists it (`Minimal`, `AnuPpuccin`), or give a GitHub repository, a URL or a local `theme.css`. Style Settings exports and CSS snippets apply as in Obsidian.
|
||||
- **Fonts built in** — font loading is part of Quartz as `configuration.fonts` (formerly the Fonts plugin), including the interface font and per-heading fonts. See [[configuration#Fonts]].
|
||||
- **`quartz build --config <path>`** — read the configuration from another file, so it can live with your content and one Quartz install can build several sites.
|
||||
- **Bases** closer to Obsidian ([[BasesPage]] 1.5) — custom summaries, `html()`, `image()`, `icon()`, regular expressions and `file.backlinks` in formulas, `kanban` views, `groupOrder`, grouped lists and cards, and columns labelled with the property's name. Bases inside a transcluded note render, and links in bases follow `configuration.links`.
|
||||
- **Transclusions** — headings and footnotes inside a transclusion get ids unique on the page, and a heading transclusion holds only the footnotes it references.
|
||||
- **Permalinks on large sites** — notes with a `permalink` are published at it on sites of any size.
|
||||
- **Plugins** can be async and declare `renderTransforms`, so encrypted notes show their bases and transclusions once unlocked ([[EncryptedPages]]).
|
||||
|
||||
## New in 5.1
|
||||
|
||||
Upgrading from 5.0? See [[upgrading#Upgrading from 5.0 to 5.1|Upgrading from 5.0 to 5.1]] for the steps and the changes you may notice.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ 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 these installed on your machine before continuing. See the [[getting-started/index#Prerequisites|prerequisites]] for help installing them.
|
||||
Quartz requires **at least [Node](https://nodejs.org/) v22.22** 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.
|
||||
|
||||
> [!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.
|
||||
|
||||
@@ -170,12 +170,17 @@ plugins:
|
||||
|
||||
Available built-in conditions:
|
||||
|
||||
| Condition | Description |
|
||||
| --------------- | ----------------------------------------------------- |
|
||||
| `not-index` | Only render when the page is not the root `index.md` |
|
||||
| `has-tags` | Only render when the page has tags in its frontmatter |
|
||||
| `has-backlinks` | Only render when the page has backlinks |
|
||||
| `has-toc` | Only render when the page has a table of contents |
|
||||
| Condition | Description |
|
||||
| ----------------- | --------------------------------------------------------------------------- |
|
||||
| `is-index` | Only render on the root `index.md` (the home page) |
|
||||
| `not-index` | Only render when the page is not the root `index.md` |
|
||||
| `is-folder-index` | Only render on a folder's index page (`folder/index.md` or a generated one) |
|
||||
| `has-tags` | Only render when the page has tags in its frontmatter |
|
||||
| `has-backlinks` | Only render when the page has backlinks |
|
||||
| `has-toc` | Only render when the page has a table of contents |
|
||||
| `not-<condition>` | Negates any other condition, e.g. `not-has-tags`, `not-has-backlinks` |
|
||||
|
||||
The `not-` prefix also works for conditions registered by plugins or in `quartz.ts`. To change the layout of a whole page type (folder pages, tag pages, …) rather than single pages, use `layout.byPageType` (see [[layout#Per-page-type overrides]]).
|
||||
|
||||
### TS Override
|
||||
|
||||
|
||||
+9
-6
@@ -132,12 +132,15 @@ plugins:
|
||||
|
||||
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 |
|
||||
| `has-backlinks` | Only shown on pages that another (listed) page links to |
|
||||
| `has-toc` | Only shown on pages with a table of contents (needs `table-of-contents`) |
|
||||
| Condition | Effect |
|
||||
| ----------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `is-index` | Only shown on the root index page (the home page) |
|
||||
| `not-index` | Hidden on the root index page, shown everywhere else |
|
||||
| `is-folder-index` | Only shown on folder index pages (`folder/index.md` or a generated one), not on tag pages (`tags/` and `tags/<tag>`) |
|
||||
| `has-tags` | Only shown on pages that have tags in frontmatter |
|
||||
| `has-backlinks` | Only shown on pages that another (listed) page links to |
|
||||
| `has-toc` | Only shown on pages with a table of contents (needs `table-of-contents`) |
|
||||
| `not-<condition>` | Negates any condition, built-in or registered: `not-has-tags`, `not-has-toc` |
|
||||
|
||||
Plugins can register additional conditions. An unknown condition name prints a warning at build time and the component is always shown.
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ With Quartz 5.1, `.base` pages follow the site's publish filters (e.g. [[Explici
|
||||
|
||||
This plugin accepts the following configuration options:
|
||||
|
||||
- `propertyLabels`: How column and property labels are shown. `"name"` (default) shows a property's name as Obsidian does (`priority`, `file name`); `"title"` title-cases it (`Priority`, `Name`). A property's `displayName` is always used.
|
||||
- `defaultViewType`: Open a base on its first view of this type. Unset by default: a base opens on its first view, as in Obsidian.
|
||||
- `linkResolution`: How to resolve internal links in view renderers. Should match `configuration.links.markdownLinkResolution` (built-in [[CrawlLinks|link processing]]). 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.
|
||||
|
||||
@@ -21,6 +21,8 @@ This plugin accepts the following configuration options:
|
||||
- `initialZoom`: The initial zoom level when the canvas is first displayed. Default: `1{:ts}`.
|
||||
- `minZoom`: The minimum zoom level allowed when zooming out. Default: `0.1{:ts}`.
|
||||
- `maxZoom`: The maximum zoom level allowed when zooming in. Default: `5{:ts}`.
|
||||
- `wheelBehavior`: What the mouse wheel and two-finger trackpad scroll do. `"pan"` (default) moves the canvas, as in Obsidian (Shift + wheel: sideways); Ctrl/Cmd + wheel and pinching zoom. `"zoom"`: the wheel always zooms.
|
||||
- `textNodeMarkdown`: How text nodes are rendered. `"site"` (default): with the site's own Markdown plugins, like a note. `"basic"`: plain CommonMark + GFM, with wikilinks and links to notes still resolved.
|
||||
|
||||
### Canvas Frame
|
||||
|
||||
@@ -43,7 +45,7 @@ layout:
|
||||
|
||||
### Features
|
||||
|
||||
- **Text nodes**: Render Markdown content including headings, bold, italic, strikethrough, lists, links, and code blocks via [GFM](https://github.github.com/gfm/) support.
|
||||
- **Text nodes**: Rendered with the site's own Markdown plugins, like a note, as in Obsidian: wikilinks, callouts, [[Mermaid diagrams]], math, syntax highlighting and embedded notes (`![[Note#Section]]`). Tags in text nodes count as the canvas's tags, so they get tag pages.
|
||||
- **File nodes**: Link to other pages in your vault. Supports popover previews on hover.
|
||||
- **Link nodes**: Reference external URLs.
|
||||
- **Group nodes**: Visual grouping containers with optional labels and background colors.
|
||||
|
||||
@@ -36,6 +36,10 @@ Options:
|
||||
> [!note]
|
||||
> An existing `@quartz-community/content-index` entry is applied to `configuration.contentIndex` automatically. Run `npx quartz plugin doctor --fix` to move it.
|
||||
|
||||
## `contentIndex.json`
|
||||
|
||||
Each entry of `static/contentIndex.json` is keyed by slug and holds `slug`, `filePath`, `title`, `links`, `tags` and `content` (the page's text), plus `date` when the page has one: the date selected by `defaultDateType` of [[CreatedModifiedDate]] (the same date [[ContentMeta]] shows and the RSS feed uses), as an ISO 8601 string such as `"2024-01-02T03:04:05.000Z"`. Client-side components can use it to sort by date, e.g. `new Date(entry.date)`. When that date is the one the page's frontmatter sets for the configured date type (e.g. `modified:` / `lastmod:` with `defaultDateType: modified`), rather than one from git or the file system, the entry also has `dateFromFrontmatter: true`; otherwise the field is absent.
|
||||
|
||||
## Adding fields
|
||||
|
||||
Plugins can add their own fields to each entry of `contentIndex.json` with `extendContentIndex` — see [[making plugins#Extending the content index]].
|
||||
|
||||
@@ -32,7 +32,7 @@ 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 links are processed.
|
||||
- `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 `true`, as Obsidian marks unresolved links. Applies to both wikilinks and regular Markdown links, since both are indistinguishable `<a>` elements by the time links are processed. Only targets Quartz can check are marked: pages, and files of the types a vault holds (images, audio, video, PDFs, canvases, bases) that the content doesn't have. Links to other files, which Quartz or a plugin may emit (`index.xml`, `sitemap.xml`, `robots.txt`, anything under `static/`), are never marked. Links to pages that a filter removes (e.g. [[RemoveDrafts|drafts]] or pages without `publish: true` under [[ExplicitPublish]]) are marked `broken` too, since they 404; they also get `data-filtered="<filter name>"`. A folder link stays unbroken when only the folder's `index.md` is removed, because the folder still gets a generated folder page.
|
||||
- `enabled`: set to `false` to turn link processing off (not recommended — links break on nested pages and backlinks/graph are empty).
|
||||
- `order`: position among transformers. Defaults to `60`, after the Markdown flavour plugins (e.g. [[ObsidianFlavoredMarkdown]] at `40`) that turn wikilinks into links.
|
||||
|
||||
|
||||
@@ -26,15 +26,17 @@ This plugin accepts the following configuration options:
|
||||
- `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`.
|
||||
- `sort`: Sort rules, applied in sequence: entries the first rule considers equal are sorted by the next one. Defaults to `[folder, title]` (folders first, then by title). See [[features/explorer#Sorting]].
|
||||
- `rootFolder`: Show only this folder's contents, e.g. `Notes` or `Notes/Daily Notes`. Defaults to everything. See [[features/explorer#Several explorers]].
|
||||
- `order`: The order in which `filterFn`, `mapFn` and `sortFn` run. Defaults to `[filter, map, sort]`.
|
||||
|
||||
**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.
|
||||
- `sortFn`: Custom sort function for ordering files and folders. Replaces `sort`.
|
||||
- `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"]`.
|
||||
|
||||
By default the explorer hides the `tags` folder (`filterFn`) and sorts folders before files, then alphabetically with numeric ordering (`sortFn`).
|
||||
By default the explorer hides the `tags` folder (`filterFn`) and sorts folders before files, then by title in natural order (`Note 2` before `Note 10`).
|
||||
|
||||
### Default options
|
||||
|
||||
|
||||
+27
-209
@@ -1,227 +1,45 @@
|
||||
---
|
||||
title: Fonts
|
||||
description: Fine-grained font control with per-heading support, Google Fonts integration, and theme font discovery.
|
||||
description: Built-in font loading — Google Fonts, self-hosted or local — with per-heading fonts.
|
||||
tags:
|
||||
- plugin/transformer
|
||||
- plugin/emitter
|
||||
image:
|
||||
repository: "[quartz-community/fonts](https://github.com/quartz-community/fonts)"
|
||||
enabled: true
|
||||
required: false
|
||||
- feature
|
||||
- built-in
|
||||
---
|
||||
|
||||
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 [[ThemesCore|Quartz Themes]], Google Fonts integration with automatic weight and italic loading, and otherwise falls back to the fonts set in `configuration.theme.typography`.
|
||||
|
||||
> [!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
|
||||
Font loading is [[built-in processing|built into Quartz]] (since 5.2; formerly the `@quartz-community/quartz-fonts` plugin). It loads the fonts set in `configuration.theme.typography`, and adds per-heading fonts, an interface font, and self-hosting.
|
||||
|
||||
## 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` | see below | Font family for body text. |
|
||||
| `header` | `FontSpecification` | see below | Default font family for all headings (h1-h6). |
|
||||
| `code` | `FontSpecification` | see below | 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 [[ThemesCore\|Quartz Themes]] as defaults when it is enabled. |
|
||||
| `fontOrigin` | `string` | `"googleFonts"` | `"googleFonts"` to load from Google Fonts CDN, `"selfHosted"` to download and serve locally, `"local"` for no loading. |
|
||||
|
||||
### Default options
|
||||
Options go under `configuration.fonts` in `quartz.config.yaml`:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
options:
|
||||
useThemeFonts: true
|
||||
fontOrigin: googleFonts
|
||||
```
|
||||
|
||||
### Font resolution
|
||||
|
||||
Fonts are resolved using a priority chain:
|
||||
|
||||
```
|
||||
Plugin option
|
||||
→ Theme font (from Quartz Themes, if enabled and useThemeFonts is on)
|
||||
→ configuration.theme.typography (header, body, code, title)
|
||||
→ Quartz defaults (Schibsted Grotesk, Source Sans Pro, IBM Plex Mono)
|
||||
```
|
||||
|
||||
For individual headings:
|
||||
|
||||
```
|
||||
h1 option → theme --h1-font → header option → theme body font → resolved header font
|
||||
```
|
||||
|
||||
For the site title:
|
||||
|
||||
```
|
||||
title option → configuration.theme.typography.title → resolved header font
|
||||
```
|
||||
|
||||
The `interface` font comes from the option, then the theme's `--font-interface`, then Obsidian's default sans-serif stack.
|
||||
|
||||
With `fontOrigin: googleFonts` or `selfHosted`, the header, body, code and title fonts are loaded from Google Fonts: the plugin options if set, otherwise `configuration.theme.typography`, otherwise the Quartz defaults.
|
||||
|
||||
## Usage with Quartz Themes
|
||||
|
||||
When [[ThemesCore|Quartz Themes]] is 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 uses `configuration.theme.typography` (or the Quartz defaults). You can set fonts explicitly via the plugin options.
|
||||
|
||||
## Examples
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
# Use theme fonts automatically (default behavior)
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
|
||||
# Override just the heading font
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
options:
|
||||
header: '"Playfair Display", serif'
|
||||
|
||||
# Full control with per-heading fonts
|
||||
- source: "@quartz-community/quartz-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: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
options:
|
||||
fontOrigin: googleFonts
|
||||
body: Inter
|
||||
header: Playfair Display
|
||||
code: JetBrains Mono
|
||||
|
||||
# Google Fonts with weight/italic control
|
||||
- source: "@quartz-community/quartz-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: "@quartz-community/quartz-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: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
options:
|
||||
configuration:
|
||||
theme:
|
||||
typography:
|
||||
header: Schibsted Grotesk
|
||||
body: Source Sans Pro
|
||||
code: IBM Plex Mono
|
||||
fonts:
|
||||
fontOrigin: selfHosted
|
||||
body: Inter
|
||||
header: Playfair Display
|
||||
code: JetBrains Mono
|
||||
|
||||
# Ignore theme fonts entirely
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
options:
|
||||
useThemeFonts: false
|
||||
body: '"Inter", sans-serif'
|
||||
h1: { name: Playfair Display, weights: [700] }
|
||||
```
|
||||
|
||||
## Self-Hosted Fonts
|
||||
- `fontOrigin`: where fonts load from. Default `"googleFonts"`.
|
||||
- `"googleFonts"`: link the fonts from Google Fonts.
|
||||
- `"selfHosted"`: download them from Google Fonts at build time and serve them from your site (`static/fonts/`), so the site is self-contained.
|
||||
- `"local"`: don't load anything; the fonts must be available otherwise.
|
||||
- `title`, `header`, `body`, `code`: override the matching `theme.typography` font.
|
||||
- `interface`: font for interface elements (Obsidian's `--font-interface`).
|
||||
- `h1` … `h6`: per-heading fonts. Unset headings use `header`.
|
||||
- `useThemeFonts`: use the fonts of a theme plugin such as [[ThemesCore|Quartz Themes]]. Default `true`.
|
||||
- `enabled: false` turns font handling off; `order` changes when it runs.
|
||||
|
||||
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.
|
||||
A font is a name (any [Google Font](https://fonts.google.com/)) or `{ name, weights, includeItalic }`; see [[configuration#Fonts|Fonts in the configuration]].
|
||||
|
||||
At build time, the plugin:
|
||||
## With Quartz Themes
|
||||
|
||||
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
|
||||
An Obsidian theme sets its own fonts, including heading fonts. With [[ThemesCore|Quartz Themes]] enabled, Quartz leaves them to the theme and only applies the fonts you set explicitly here (for example `h1`, or `header` for all headings).
|
||||
|
||||
The stylesheet is linked relative to each page and the font files relative to the stylesheet, so self-hosted fonts work on `localhost`, on any host and under a base path; `baseUrl` is not needed.
|
||||
## Upgrading from the plugin
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: "@quartz-community/quartz-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 @quartz-community/quartz-fonts` (included in the default configuration)
|
||||
An existing `@quartz-community/quartz-fonts` entry keeps working: its options are applied to `configuration.fonts` and the package is no longer loaded. Run `npx quartz plugin doctor --fix` to move them.
|
||||
@@ -20,6 +20,8 @@ This plugin accepts the following configuration options:
|
||||
|
||||
- `enableSmartyPants`: When true, enables typographic enhancements. Default is true.
|
||||
- `linkHeadings`: When true, gives headings their `id`s and adds a link to each heading. Default is true. Setting it to `false` also turns off heading ids, so links to headings (`[[page#Heading]]`) and section embeds no longer reach them (on pages with a [[table of contents]], TableOfContents still gives headings ids).
|
||||
- `singleTilde`: When true (default), text between single tildes (`~text~`) is struck through, as on GitHub. `false` strikes only `~~text~~`, as Obsidian does, so a `~` meaning "about" (`~20 W and (~€120)`) stays as written. Under [[ObsidianFlavoredMarkdown]]'s default `legacy` preset, which parses as Obsidian, single tildes never strike.
|
||||
- `replacements`: Text to replace as written, outside code and math, before SmartyPants; the longest match wins. Empty by default: neither GitHub nor Obsidian replaces anything. See [[#Arrows]].
|
||||
|
||||
### Default options
|
||||
|
||||
@@ -29,11 +31,34 @@ This plugin accepts the following configuration options:
|
||||
options:
|
||||
enableSmartyPants: true
|
||||
linkHeadings: true
|
||||
singleTilde: true
|
||||
replacements: {}
|
||||
order: 30
|
||||
```
|
||||
|
||||
This plugin must run before [[ObsidianFlavoredMarkdown]] (order `30` and `40` in the default config). If you set `order` on either plugin, keep this one first.
|
||||
|
||||
## Arrows
|
||||
|
||||
Quartz 4 turned typed arrows into arrow characters (`parseArrows`). Obsidian doesn't, so Quartz 5 leaves them as typed. To render them as Quartz 4 did:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
plugins:
|
||||
- source: "@quartz-community/github-flavored-markdown"
|
||||
options:
|
||||
replacements:
|
||||
"->": "→"
|
||||
"-->": "⇒"
|
||||
"=>": "⇒"
|
||||
"==>": "⇒"
|
||||
"<-": "←"
|
||||
"<--": "⇐"
|
||||
"<=": "⇐"
|
||||
"<==": "⇐"
|
||||
```
|
||||
|
||||
Text in code, inline code and math is left alone. Note that `<=` then also replaces a "less than or equal" written in prose.
|
||||
|
||||
## Heading ids
|
||||
|
||||
Heading ids are made from the heading as written, with the same slug function that links and the [[table of contents]] use, and match GitHub's:
|
||||
|
||||
@@ -22,7 +22,7 @@ This plugin accepts the following configuration 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.
|
||||
|
||||
With KaTeX, the KaTeX stylesheet and its copy-tex script are loaded from jsDelivr.
|
||||
With KaTeX, the KaTeX stylesheet and its copy-tex script are loaded from jsDelivr. The stylesheet blocks rendering only on pages with math; elsewhere it loads in the background, ready for pages opened with SPA navigation.
|
||||
|
||||
### Default options
|
||||
|
||||
|
||||
@@ -22,10 +22,11 @@ This plugin accepts the following configuration options:
|
||||
- `strictLineBreaks`: Obsidian's "Strict line breaks" setting. `false` (the default under `preset: "legacy"`) renders a single line break inside a paragraph as a `<br>`, as in Obsidian's default reading view. `true` (the default under `preset: "strict"`) renders it as a space, as CommonMark does. This replaces the deprecated [[HardLineBreaks]] plugin.
|
||||
- `comments`: If `true` (default), enables parsing of `%%` style Obsidian comment blocks.
|
||||
- `highlight`: If `true` (default), enables parsing of `==` style highlights within content. A highlight that starts with a colour emoji (🔴 🟠 🟡 🟢 🔵 🟣, or the matching squares) is coloured as in Obsidian 1.14, e.g. `==🔴 urgent==`.
|
||||
- `math`: If `true` (default), parses `$inline$` and `$$display$$` math. With `false`, dollar signs stay text (`cost of $2-$3`), for sites without math.
|
||||
- `wikilinks`: If `true` (default), turns [[wikilinks]] into regular links.
|
||||
- `callouts`: If `true` (default), adds support for [[callouts|callout]] blocks for emphasizing content.
|
||||
- `mermaid`: If `true` (default), enables [[Mermaid diagrams|Mermaid diagram]] parsing within Markdown files.
|
||||
- `diagramRenderer`: `"mermaid"` (default) or `"pele"`. Which engine draws Mermaid fences. [Pele](https://pele.run) is opt-in; Mermaid.js is deprecated.
|
||||
- `diagramRenderer`: `"pele"` (default) or `"mermaid"`. Which engine draws Mermaid fences: [Pele](https://pele.run), as in Obsidian, or the deprecated Mermaid.js.
|
||||
- `parseTags`: If `true` (default), parses and links tags within the content.
|
||||
- `parseBlockReferences`: If `true` (default), handles block references, linking to specific content blocks.
|
||||
- `enableInHtmlEmbed`: If `true`, allows embedding of content directly within HTML. Defaults to `false`.
|
||||
@@ -34,6 +35,10 @@ 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`; the default `quartz.config.yaml` turns it on.
|
||||
- `enableObsidianUri`: If `true` (default), marks `obsidian://` protocol links with a CSS class and data attribute for custom styling.
|
||||
- `markdownEmbeds`: If `true` (default), a note, canvas or base embedded with a Markdown link (``, ``, ``, ``) is transcluded like `![[note#Section]]`, as in Obsidian (which writes embeds this way when its `Use [[Wikilinks]]` setting is off), instead of shown as a broken image. The link resolves like any Markdown link, by `configuration.links.markdownLinkResolution`.
|
||||
- `blockWrappers`: If `true` (default), wraps each top-level block in the `div` Obsidian puts it in (`div.el-p > p`), which Obsidian themes space blocks with. No visible change without a theme.
|
||||
- `foldHeadings`: If `true`, headings fold as in Obsidian's reading view ("Fold heading"): an arrow before each heading, shown on hover, hides everything up to the next heading of the same or a higher level. Defaults to `false`.
|
||||
- `foldLists`: If `true`, list items with a sublist fold as in Obsidian's reading view ("Fold indent"): an arrow before the item, shown on hover, hides its sublist. Defaults to `false`.
|
||||
|
||||
Also supported:
|
||||
|
||||
|
||||
+21
-17
@@ -3,7 +3,7 @@ title: ThemesCore
|
||||
aliases:
|
||||
- QuartzThemes
|
||||
- Quartz Themes
|
||||
description: Obsidian community themes for Quartz, with per-aspect mix-and-match.
|
||||
description: Use any Obsidian community theme, converted at build time.
|
||||
tags:
|
||||
- plugin/transformer
|
||||
image:
|
||||
@@ -13,24 +13,29 @@ enabled: false
|
||||
required: false
|
||||
---
|
||||
|
||||
This plugin styles your site with an Obsidian community theme from [Quartz Themes](https://github.com/saberzero1/quartz-themes): hundreds of themes, converted from their Obsidian CSS. The theme's CSS is added to every page; the [[features/darkmode|dark mode]] toggle switches between its light and dark variants.
|
||||
This plugin styles your site with any Obsidian community theme. You name the theme; at build time the plugin downloads it (the same file Obsidian installs) and converts its CSS for Quartz. The [[features/darkmode|dark mode]] toggle switches between the theme's light and dark variants, and [Style Settings](https://github.com/mgmeyers/obsidian-style-settings) exports apply as they do in Obsidian.
|
||||
|
||||
> [!note]
|
||||
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
|
||||
|
||||
A theme colours the page through Obsidian's CSS variables, so `configuration.theme.colors` then has little or no effect; see [[configuration#General Configuration|Configuration]] for overriding a theme's colours. With [[Fonts]] enabled, the theme's fonts are used as defaults (Quartz Themes runs first, at order `10`).
|
||||
A theme colours the page through Obsidian's CSS variables, so `configuration.theme.colors` then has little or no effect; see [[configuration#General Configuration|Configuration]] for overriding a theme's colours. With [[Fonts]] enabled, configured fonts still apply to Quartz's own interface; the theme keeps its fonts for content unless you set `header`/`h1`–`h6` explicitly.
|
||||
|
||||
## Configuration
|
||||
|
||||
This plugin accepts the following configuration options:
|
||||
|
||||
- `theme`: The theme's id, e.g. `tokyo-night`, `catppuccin`, `minimal`. Defaults to `"tokyo-night"`.
|
||||
- `theme`: The theme. Defaults to `"Tokyo Night"`. Accepts:
|
||||
- a community theme name, as listed in Obsidian (`Minimal`, `AnuPpuccin`);
|
||||
- a GitHub repository for themes outside the registry (`kepano/obsidian-minimal`);
|
||||
- a URL to a `theme.css`, or a local path (`./themes/My Theme`, `./my-theme.css`);
|
||||
- an id from earlier versions (`tokyo-night`, `catppuccin.frappe`), which maps to the theme and the Style Settings preset it used.
|
||||
- `mode`: `"both"`, `"light"` or `"dark"`. Defaults to `"both"`. With a single mode (or a theme that only has one), the dark mode toggle is hidden and the site stays in that mode.
|
||||
- `variation`: A variation of the theme, if it has any (e.g. `frappe` for `catppuccin`).
|
||||
- `aspects`: Take single aspects from other themes, or leave them out with `false`, e.g. `{ callouts: anuppuccin, code: false }`. Aspects: `base`, `headings`, `typography`, `callouts`, `tables`, `code`, `links`, `blockquotes`, `checkboxes`, `images`, `embeds`, `cards`, `search`, `scrollbars`, `explorer`, `toc`, `graph`, `popover`, `footer`, `recentNotes`, `listPage`, `darkmode`, `breadcrumbs`, `lists`, `canvas`, `bases`, `properties`, `stacked`, `misc`.
|
||||
- `include`: Only include these aspects (plus those set in `aspects`). Defaults to all.
|
||||
- `themeFonts`: Whether to include the theme's fonts. Defaults to `true`.
|
||||
- `styleSettings`: Settings for themes that support the Obsidian [Style Settings](https://github.com/mgmeyers/obsidian-style-settings) plugin: an export from that plugin, or the path to a JSON file holding one. Keys look like `minimal-style@@bg1`.
|
||||
- `styleSettings`: An export from the Style Settings plugin, or the path to a JSON file holding one. Keys look like `minimal-style@@h1-color@@dark`.
|
||||
- `snippets`: Obsidian CSS snippets (paths or URLs), applied after the theme.
|
||||
- `version`: Pin a community theme to a release version. Defaults to the latest.
|
||||
- `themeFonts`: Whether to include the theme's own web fonts. Defaults to `true`.
|
||||
- `cacheDir`: Where downloaded themes are cached. Defaults to `.quartz-cache/quartz-themes`. Builds work offline from the cache.
|
||||
- `cacheHours`: How long before checking for a new theme version. Defaults to `24`.
|
||||
|
||||
### Default options
|
||||
|
||||
@@ -40,24 +45,23 @@ The default config has a disabled entry for this plugin. Set `enabled: true` to
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: true
|
||||
options:
|
||||
theme: tokyo-night
|
||||
theme: Tokyo Night
|
||||
mode: both
|
||||
```
|
||||
|
||||
Mixing aspects:
|
||||
With Style Settings:
|
||||
|
||||
```yaml title="quartz.config.yaml"
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: true
|
||||
options:
|
||||
theme: tokyo-night
|
||||
mode: both
|
||||
aspects:
|
||||
callouts: anuppuccin
|
||||
tables: minimal
|
||||
code: false
|
||||
theme: Minimal
|
||||
styleSettings: ./style-settings.json
|
||||
```
|
||||
|
||||
> [!info] Upgrading from 2.x
|
||||
> Per-theme `@quartz-themes/<theme>` packages are no longer used and can be removed. `aspects`, `include`, `calloutStyle` and `fonts` were removed: themes are converted whole. Theme ids from 2.x keep working.
|
||||
|
||||
## API
|
||||
|
||||
- Category: Transformer
|
||||
|
||||
Vendored
+6
@@ -3,6 +3,12 @@ declare module "*.scss" {
|
||||
export = content
|
||||
}
|
||||
|
||||
// micromorph ships these types, but its package.json "exports" don't list them, so TypeScript's
|
||||
// "bundler" resolution doesn't find them
|
||||
declare module "micromorph" {
|
||||
export default function micromorph(from: Node, to: Node): Promise<void>
|
||||
}
|
||||
|
||||
// dom custom event
|
||||
interface CustomEventMap {
|
||||
prenav: CustomEvent<{}>
|
||||
|
||||
Generated
+1012
-1122
File diff suppressed because it is too large.
Load diff
+39
-41
@@ -2,7 +2,7 @@
|
||||
"name": "@jackyzha0/quartz",
|
||||
"description": "🌱 publish your digital garden and notes as a website",
|
||||
"private": true,
|
||||
"version": "5.0.0",
|
||||
"version": "5.3.0",
|
||||
"type": "module",
|
||||
"author": "jackyzha0 <j.zhao2k19@gmail.com>",
|
||||
"license": "MIT",
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"engines": {
|
||||
"npm": ">=10.9.2",
|
||||
"node": ">=22"
|
||||
"node": ">=22.22"
|
||||
},
|
||||
"keywords": [
|
||||
"site generator",
|
||||
@@ -42,61 +42,60 @@
|
||||
"@clack/prompts": "^1.8.0",
|
||||
"@floating-ui/dom": "^1.7.4",
|
||||
"@myriaddreamin/rehype-typst": "^0.7.0",
|
||||
"@napi-rs/simple-git": "1.1.0",
|
||||
"@napi-rs/simple-git": "1.2.0",
|
||||
"@quartz-community/alias-redirects": "^1.0.3",
|
||||
"@quartz-community/article-title": "^1.0.2",
|
||||
"@quartz-community/backlinks": "^1.0.3",
|
||||
"@quartz-community/bases-page": "^1.2.1",
|
||||
"@quartz-community/breadcrumbs": "^1.0.3",
|
||||
"@quartz-community/canvas-page": "^1.0.3",
|
||||
"@quartz-community/backlinks": "^1.0.4",
|
||||
"@quartz-community/bases-page": "^1.5.6",
|
||||
"@quartz-community/breadcrumbs": "^1.0.6",
|
||||
"@quartz-community/canvas-page": "^1.1.6",
|
||||
"@quartz-community/citations": "^1.0.1",
|
||||
"@quartz-community/cname": "^1.0.1",
|
||||
"@quartz-community/comments": "^1.0.2",
|
||||
"@quartz-community/comments": "^1.0.3",
|
||||
"@quartz-community/content-meta": "^1.0.2",
|
||||
"@quartz-community/content-page": "^1.0.3",
|
||||
"@quartz-community/created-modified-date": "^1.0.3",
|
||||
"@quartz-community/darkmode": "^1.0.2",
|
||||
"@quartz-community/description": "^1.0.2",
|
||||
"@quartz-community/encrypted-pages": "^1.1.1",
|
||||
"@quartz-community/explicit-publish": "^1.1.0",
|
||||
"@quartz-community/explorer": "^1.0.3",
|
||||
"@quartz-community/created-modified-date": "^1.0.5",
|
||||
"@quartz-community/darkmode": "^1.0.3",
|
||||
"@quartz-community/description": "^1.0.3",
|
||||
"@quartz-community/encrypted-pages": "^1.3.1",
|
||||
"@quartz-community/explicit-publish": "^1.2.0",
|
||||
"@quartz-community/explorer": "^1.2.5",
|
||||
"@quartz-community/favicon": "^1.0.1",
|
||||
"@quartz-community/folder-page": "^1.0.3",
|
||||
"@quartz-community/footer": "^1.1.1",
|
||||
"@quartz-community/github-flavored-markdown": "^2.1.1",
|
||||
"@quartz-community/graph": "^1.0.3",
|
||||
"@quartz-community/folder-page": "^1.1.4",
|
||||
"@quartz-community/footer": "^1.1.2",
|
||||
"@quartz-community/github-flavored-markdown": "^2.2.2",
|
||||
"@quartz-community/graph": "^1.0.9",
|
||||
"@quartz-community/hard-line-breaks": "^1.1.0",
|
||||
"@quartz-community/latex": "^1.0.1",
|
||||
"@quartz-community/note-properties": "^1.1.4",
|
||||
"@quartz-community/obsidian-flavored-markdown": "^2.1.3",
|
||||
"@quartz-community/og-image": "^1.1.1",
|
||||
"@quartz-community/ox-hugo": "^1.0.1",
|
||||
"@quartz-community/latex": "^1.1.3",
|
||||
"@quartz-community/note-properties": "^1.2.4",
|
||||
"@quartz-community/obsidian-flavored-markdown": "^2.5.4",
|
||||
"@quartz-community/og-image": "^1.1.4",
|
||||
"@quartz-community/ox-hugo": "^1.0.4",
|
||||
"@quartz-community/page-title": "^1.0.2",
|
||||
"@quartz-community/quartz-fonts": "^1.0.2",
|
||||
"@quartz-community/reader-mode": "^1.0.2",
|
||||
"@quartz-community/reader-mode": "^1.0.3",
|
||||
"@quartz-community/recent-notes": "^1.0.3",
|
||||
"@quartz-community/roam": "^1.1.0",
|
||||
"@quartz-community/search": "^1.0.3",
|
||||
"@quartz-community/search": "^1.1.4",
|
||||
"@quartz-community/spacer": "^1.0.2",
|
||||
"@quartz-community/stacked-pages": "^1.0.3",
|
||||
"@quartz-community/syntax-highlighting": "^1.0.3",
|
||||
"@quartz-community/table-of-contents": "^1.0.3",
|
||||
"@quartz-community/stacked-pages": "^1.0.4",
|
||||
"@quartz-community/syntax-highlighting": "^1.0.5",
|
||||
"@quartz-community/table-of-contents": "^1.0.6",
|
||||
"@quartz-community/tag-list": "^1.0.3",
|
||||
"@quartz-community/tag-page": "^1.0.4",
|
||||
"@quartz-community/unlisted-pages": "^1.1.0",
|
||||
"@quartz-themes/core": "^2.0.1",
|
||||
"@quartz-community/tag-page": "^1.0.7",
|
||||
"@quartz-community/unlisted-pages": "^1.2.0",
|
||||
"@quartz-themes/core": "^3.2.1",
|
||||
"ansi-truncate": "^1.4.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"chokidar": "^5.0.0",
|
||||
"chokidar": "^6.0.0",
|
||||
"esbuild-sass-plugin": "^3.6.0",
|
||||
"globby": "^16.1.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"hast-util-from-html": "^2.0.0",
|
||||
"hast-util-to-html": "^9.0.5",
|
||||
"hast-util-to-html": "^9.0.7",
|
||||
"hast-util-to-jsx-runtime": "^2.3.6",
|
||||
"is-absolute-url": "^4.0.1",
|
||||
"is-absolute-url": "^5.0.0",
|
||||
"isomorphic-git": "^1.36.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"js-yaml": "^5.5.0",
|
||||
"lightningcss": "^1.31.1",
|
||||
"micromorph": "^0.4.5",
|
||||
"minimatch": "^11.0.5",
|
||||
@@ -118,16 +117,15 @@
|
||||
"unist-util-visit": "^5.1.0",
|
||||
"vfile": "^6.0.3",
|
||||
"workerpool": "^10.0.1",
|
||||
"ws": "^8.19.0",
|
||||
"ws": "^8.23.0",
|
||||
"yaml": "^2.8.2",
|
||||
"yargs": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.29.2",
|
||||
"@changesets/cli": "^3.0.3",
|
||||
"@quartz-community/types": "^1.3.1",
|
||||
"@quartz-community/utils": "^1.2.0",
|
||||
"@quartz-community/utils": "^1.3.3",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^26.5.1",
|
||||
"@types/pretty-time": "^1.1.5",
|
||||
"@types/semver": "^7.7.1",
|
||||
@@ -137,6 +135,6 @@
|
||||
"esbuild": "^0.28.2",
|
||||
"prettier": "^3.8.1",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^7.0.2"
|
||||
}
|
||||
}
|
||||
@@ -24,17 +24,17 @@ configuration:
|
||||
lightMode:
|
||||
light: "#faf8f8"
|
||||
lightgray: "#e5e5e5"
|
||||
gray: "#b8b8b8"
|
||||
gray: "#727272"
|
||||
darkgray: "#4e4e4e"
|
||||
dark: "#2b2b2b"
|
||||
secondary: "#284b63"
|
||||
tertiary: "#84a59d"
|
||||
tertiary: "#587971"
|
||||
highlight: rgba(143, 159, 169, 0.15)
|
||||
textHighlight: "#fff23688"
|
||||
darkMode:
|
||||
light: "#161618"
|
||||
lightgray: "#393639"
|
||||
gray: "#646464"
|
||||
gray: "#7f7f7f"
|
||||
darkgray: "#d4d4d4"
|
||||
dark: "#ebebec"
|
||||
secondary: "#7b97aa"
|
||||
@@ -96,12 +96,10 @@ plugins:
|
||||
- source: "@quartz-community/roam"
|
||||
enabled: false
|
||||
order: 92
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: false
|
||||
options:
|
||||
theme: tokyo-night
|
||||
theme: Tokyo Night
|
||||
mode: both
|
||||
- source: "@quartz-community/explicit-publish"
|
||||
enabled: false
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env -S node --no-deprecation
|
||||
const [major] = process.versions.node.split(".").map(Number)
|
||||
if (major < 22) {
|
||||
const [major, minor] = process.versions.node.split(".").map(Number)
|
||||
if (major < 22 || (major === 22 && minor < 22)) {
|
||||
console.error(
|
||||
`\nQuartz requires Node.js >= 22, but you are running Node.js ${process.version}.\n` +
|
||||
`\nQuartz requires Node.js >= 22.22, but you are running Node.js ${process.version}.\n` +
|
||||
`Please upgrade: https://nodejs.org/\n`,
|
||||
)
|
||||
process.exit(1)
|
||||
|
||||
+19
-1
@@ -26,7 +26,8 @@ import { minimatch } from "minimatch"
|
||||
import { formatLayoutReport, getLayoutReport } from "./plugins/loader/layoutReport"
|
||||
import { getBuiltinPlan } from "./plugins/loader/config-loader"
|
||||
import { prepareContentIndex } from "./plugins/builtins/contentIndex"
|
||||
import { printDiagnosticsSummary, warn } from "./util/diagnostics"
|
||||
import { filteredBy, printDiagnosticsSummary, warn } from "./util/diagnostics"
|
||||
import { LinksInstance, removedPages } from "./plugins/builtins/links"
|
||||
import { collectPermalinks } from "./util/permalinks"
|
||||
import { readFrontmatterData } from "./plugins/builtins/frontmatter"
|
||||
import { ChangeRecord, clearChangeRecord } from "./util/incremental"
|
||||
@@ -66,6 +67,21 @@ function updateSlugs(ctx: BuildCtx, allFiles: string[]): void {
|
||||
ctx.allSlugs = [...new Set([...pathSlugs, ...Object.values(ctx.permalinks)])]
|
||||
}
|
||||
|
||||
/**
|
||||
* Record the pages the filters removed, so PageTypeDispatcher marks links to them as broken
|
||||
* (built-in links, crawl-links#7) once it knows which folder and tag pages are generated.
|
||||
*/
|
||||
function markRemovedLinks(
|
||||
ctx: BuildCtx,
|
||||
all: ProcessedContent[],
|
||||
published: ProcessedContent[],
|
||||
): void {
|
||||
const links = ctx.cfg.plugins.transformers.find((t) => t.name === "Links") as
|
||||
LinksInstance | undefined
|
||||
// also when nothing was removed: in watch mode, marks from the last build may need undoing
|
||||
ctx.removedPages = links?.marksBrokenLinks ? removedPages(all, published, filteredBy) : undefined
|
||||
}
|
||||
|
||||
function reportSlugCollisions(content: ProcessedContent[]): void {
|
||||
const collisions = detectSlugCollisions(content)
|
||||
if (collisions.length === 0) return
|
||||
@@ -161,6 +177,7 @@ async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
|
||||
const parsedFiles = await parseMarkdown(ctx, filePaths)
|
||||
reportSlugCollisions(parsedFiles)
|
||||
const filteredContent = filterContent(ctx, parsedFiles)
|
||||
markRemovedLinks(ctx, parsedFiles, filteredContent)
|
||||
|
||||
await emitContent(ctx, filteredContent)
|
||||
console.log(
|
||||
@@ -418,6 +435,7 @@ async function rebuild(changes: ChangeEvent[], clientRefresh: () => void, buildD
|
||||
.map((file) => file.content)
|
||||
reportSlugCollisions(markdownContent)
|
||||
let processedFiles = filterContent(ctx, markdownContent)
|
||||
markRemovedLinks(ctx, markdownContent, processedFiles)
|
||||
|
||||
let emittedFiles = 0
|
||||
|
||||
|
||||
+39
-1
@@ -1,3 +1,4 @@
|
||||
import type { FontSpecification } from "./util/theme"
|
||||
import { QuartzComponent } from "./components/types"
|
||||
import { ValidLocale } from "./i18n"
|
||||
import { PluginSpecifier } from "./plugins/loader/types"
|
||||
@@ -100,12 +101,24 @@ export interface GlobalConfiguration {
|
||||
drafts?: DraftsConfig | boolean
|
||||
/** Built-in content index: `static/contentIndex.json`, sitemap and RSS. */
|
||||
contentIndex?: ContentIndexConfig | boolean
|
||||
/** Built-in font loading (Google Fonts, self-hosted or local) and per-heading fonts. */
|
||||
fonts?: FontsConfig | boolean
|
||||
/**
|
||||
* Controls which assets are copied to public/
|
||||
* - "all": Copy all non-markdown files (backwards compatible, default)
|
||||
* - "referenced": Only copy assets referenced by published pages
|
||||
*/
|
||||
publishAssets?: "all" | "referenced"
|
||||
/** How file paths become URLs. */
|
||||
slugs?: SlugsConfig
|
||||
}
|
||||
|
||||
export interface SlugsConfig {
|
||||
/**
|
||||
* Strip accents and other diacritics from generated slugs (`české/čeština.md` →
|
||||
* `ceske/cestina`), aliases and permalinks; links are resolved the same way. Off by default.
|
||||
*/
|
||||
stripDiacritics?: boolean
|
||||
}
|
||||
|
||||
/** Shared by every built-in: `enabled: false` turns it off (e.g. to replace it with a plugin). */
|
||||
@@ -133,7 +146,7 @@ export interface LinksConfig extends BuiltinToggle {
|
||||
lazyLoad?: boolean
|
||||
/** Add an icon after external links. Default `true`. */
|
||||
externalLinkIcon?: boolean
|
||||
/** Add a `broken` class to internal links whose target does not exist. Default `false`. */
|
||||
/** Add a `broken` class to internal links whose target does not exist, as Obsidian marks unresolved links. Default `true`. */
|
||||
disableBrokenWikilinks?: boolean
|
||||
}
|
||||
|
||||
@@ -142,6 +155,31 @@ export interface DraftsConfig extends BuiltinToggle {
|
||||
publish?: boolean
|
||||
}
|
||||
|
||||
export type { FontSpecification }
|
||||
|
||||
export interface FontsConfig extends BuiltinToggle {
|
||||
/** Override `theme.typography.title`. */
|
||||
title?: FontSpecification
|
||||
/** Override `theme.typography.body`. */
|
||||
body?: FontSpecification
|
||||
/** Override `theme.typography.header`. */
|
||||
header?: FontSpecification
|
||||
/** Override `theme.typography.code`. */
|
||||
code?: FontSpecification
|
||||
/** Font for interface elements (Obsidian's `--font-interface`). */
|
||||
interface?: FontSpecification
|
||||
h1?: FontSpecification
|
||||
h2?: FontSpecification
|
||||
h3?: FontSpecification
|
||||
h4?: FontSpecification
|
||||
h5?: FontSpecification
|
||||
h6?: FontSpecification
|
||||
/** Use fonts registered by a theme plugin (e.g. @quartz-themes/core). Default `true`. */
|
||||
useThemeFonts?: boolean
|
||||
/** Where fonts load from. Default `"googleFonts"`. */
|
||||
fontOrigin?: "googleFonts" | "local" | "selfHosted"
|
||||
}
|
||||
|
||||
export interface ContentIndexConfig extends BuiltinToggle {
|
||||
/** Emit `sitemap.xml`. Default `true`. */
|
||||
enableSiteMap?: boolean
|
||||
|
||||
@@ -76,6 +76,11 @@ export const SyncArgv = {
|
||||
|
||||
export const BuildArgv = {
|
||||
...CommonArgv,
|
||||
config: {
|
||||
string: true,
|
||||
alias: ["C"],
|
||||
describe: "path to the config file (default: ./quartz.config.yaml)",
|
||||
},
|
||||
output: {
|
||||
string: true,
|
||||
alias: ["o"],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @quartz-community/crawl-links → configuration.links
|
||||
* @quartz-community/remove-draft → configuration.drafts
|
||||
* @quartz-community/content-index → configuration.contentIndex
|
||||
* @quartz-community/quartz-fonts → configuration.fonts
|
||||
* note-properties `delimiters` / `language` options → configuration.frontmatter
|
||||
*
|
||||
* Pure: takes the parsed config, returns a migrated copy and a list of human-readable changes.
|
||||
@@ -21,6 +22,8 @@ const ABSORBED = {
|
||||
},
|
||||
"remove-draft": { key: "drafts", defaultOrder: 50, legacyDefaults: {} },
|
||||
"content-index": { key: "contentIndex", defaultOrder: 50, legacyDefaults: {} },
|
||||
"quartz-fonts": { key: "fonts", defaultOrder: 60, legacyDefaults: {} },
|
||||
fonts: { key: "fonts", defaultOrder: 60, legacyDefaults: {} },
|
||||
}
|
||||
|
||||
const FRONTMATTER_DEFAULTS = { delimiters: "---", language: "yaml" }
|
||||
@@ -167,6 +170,7 @@ export function describeBuiltins(configuration = {}) {
|
||||
["links", "link resolution, backlinks/graph data (was crawl-links)"],
|
||||
["drafts", "hides `draft: true` pages (was remove-draft)"],
|
||||
["contentIndex", "contentIndex.json, sitemap, RSS (was content-index)"],
|
||||
["fonts", "font loading, per-heading fonts (was quartz-fonts)"],
|
||||
]
|
||||
return rows.map(([key, description]) => {
|
||||
const value = configuration?.[key]
|
||||
|
||||
@@ -127,6 +127,7 @@ describe("built-in helpers", () => {
|
||||
test("builtinKeyFor / builtinMessage recognise names and official sources", () => {
|
||||
assert.strictEqual(builtinKeyFor("crawl-links"), "links")
|
||||
assert.strictEqual(builtinKeyFor("@quartz-community/content-index"), "contentIndex")
|
||||
assert.strictEqual(builtinKeyFor("@quartz-community/quartz-fonts"), "fonts")
|
||||
assert.strictEqual(builtinKeyFor("graph"), undefined)
|
||||
assert.match(builtinMessage("remove-draft"), /configuration\.drafts.*publish: true/)
|
||||
assert.strictEqual(builtinKeyFor({ repo: "github:quartz-community/crawl-links" }), "links")
|
||||
@@ -146,6 +147,7 @@ describe("built-in helpers", () => {
|
||||
["links", false],
|
||||
["drafts", false],
|
||||
["contentIndex", true],
|
||||
["fonts", true],
|
||||
],
|
||||
)
|
||||
})
|
||||
|
||||
+24
-5
@@ -39,6 +39,7 @@ import {
|
||||
readPluginsJson,
|
||||
writePluginsJson,
|
||||
updateGlobalConfig,
|
||||
extendedConfigFiles,
|
||||
LOCKFILE_PATH,
|
||||
} from "./plugin-data.js"
|
||||
import {
|
||||
@@ -334,6 +335,17 @@ export async function handleBuild(argv) {
|
||||
argv.watch = true
|
||||
}
|
||||
|
||||
// Let `--config <path>` override the default ./quartz.config.yaml. Passed down
|
||||
// via env so it reaches the esbuild-bundled build code and worker threads.
|
||||
if (argv.config) {
|
||||
const resolved = path.resolve(argv.config)
|
||||
if (!fs.existsSync(resolved)) {
|
||||
console.error(`Config file not found: ${resolved}`)
|
||||
process.exit(1)
|
||||
}
|
||||
process.env.QUARTZ_CONFIG_PATH = resolved
|
||||
}
|
||||
|
||||
// " Quartz v5.1.0 " for a release checkout, plus `git describe` (e.g. v5.1.0-3-g1a2b3c4-dirty) otherwise
|
||||
const checkout = describeQuartzCheckout()
|
||||
const describe = checkout.describe && checkout.describe !== `v${version}` ? checkout.describe : ""
|
||||
@@ -607,11 +619,18 @@ export async function handleBuild(argv) {
|
||||
"quartz.config.yaml",
|
||||
"quartz.config.default.yaml",
|
||||
])
|
||||
chokidar
|
||||
.watch(paths, { ignoreInitial: true })
|
||||
.on("add", () => build(clientRefresh))
|
||||
.on("change", () => build(clientRefresh))
|
||||
.on("unlink", () => build(clientRefresh))
|
||||
const extraWatch = process.env.QUARTZ_CONFIG_PATH ? [process.env.QUARTZ_CONFIG_PATH] : []
|
||||
// local files the config extends (and the files they extend); looked up again after each
|
||||
// change, so a newly added base is watched too
|
||||
const watcher = chokidar.watch([...paths, ...extraWatch, ...(await extendedConfigFiles())], {
|
||||
ignoreInitial: true,
|
||||
})
|
||||
const rebuild = async () => {
|
||||
await build(clientRefresh)
|
||||
const bases = await extendedConfigFiles()
|
||||
if (bases.length > 0) watcher.add(bases)
|
||||
}
|
||||
watcher.on("add", rebuild).on("change", rebuild).on("unlink", rebuild)
|
||||
|
||||
console.log(styleText("gray", "hint: exit with ctrl+c"))
|
||||
}
|
||||
|
||||
+11
-2
@@ -23,6 +23,7 @@ import { builtinKeyFor, describeBuiltins } from "./builtin-migration.js"
|
||||
import { shortPluginName } from "./plugin-validation.js"
|
||||
import {
|
||||
readConfigWithDiagnostics,
|
||||
resolveEffectiveConfig,
|
||||
readLockfile,
|
||||
extractPluginName,
|
||||
formatSource,
|
||||
@@ -56,10 +57,18 @@ function readPackage(dir) {
|
||||
}
|
||||
}
|
||||
|
||||
export function collectInfo(root = process.cwd()) {
|
||||
export async function collectInfo(root = process.cwd()) {
|
||||
const version = readQuartzVersion(root)
|
||||
const checkout = describeQuartzCheckout(root)
|
||||
const config = readConfigWithDiagnostics()
|
||||
// with `extends`, the merged configuration the build uses
|
||||
if (config.data && !config.error) {
|
||||
try {
|
||||
config.data = await resolveEffectiveConfig(config.data, config.path)
|
||||
} catch (err) {
|
||||
config.error = `extends: ${String(err?.message ?? err)}`
|
||||
}
|
||||
}
|
||||
const lockfile = readLockfile()
|
||||
const entries = Array.isArray(config.data?.plugins) ? config.data.plugins : []
|
||||
|
||||
@@ -176,7 +185,7 @@ export function formatInfoMarkdown(info) {
|
||||
}
|
||||
|
||||
export async function handleInfo({ json = false } = {}) {
|
||||
const info = collectInfo()
|
||||
const info = await collectInfo()
|
||||
if (json) {
|
||||
console.log(JSON.stringify(info, null, 2))
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@ const LEGACY_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.json")
|
||||
const LEGACY_DEFAULT_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.default.json")
|
||||
|
||||
function resolveConfigPath() {
|
||||
if (process.env.QUARTZ_CONFIG_PATH) return path.resolve(process.env.QUARTZ_CONFIG_PATH)
|
||||
if (fs.existsSync(CONFIG_YAML_PATH)) return CONFIG_YAML_PATH
|
||||
if (fs.existsSync(LEGACY_PLUGINS_JSON_PATH)) return LEGACY_PLUGINS_JSON_PATH
|
||||
if (fs.existsSync(DEFAULT_CONFIG_YAML_PATH)) return DEFAULT_CONFIG_YAML_PATH
|
||||
@@ -157,6 +158,65 @@ export function readPluginsJson() {
|
||||
return data
|
||||
}
|
||||
|
||||
/** Whether a config (as read from its file) extends another (`extends:` with at least one base). */
|
||||
export function configExtends(data) {
|
||||
if (!isPlainObject(data)) return false
|
||||
const value = data.extends
|
||||
if (value === undefined || value === null) return false
|
||||
return !Array.isArray(value) || value.length > 0
|
||||
}
|
||||
|
||||
let configExtendsModule
|
||||
/**
|
||||
* The build's `extends` implementation (quartz/plugins/loader/config-extends.ts), loaded through
|
||||
* tsx only when a config uses `extends`, so the CLI merges exactly as the build does.
|
||||
*/
|
||||
export function loadConfigExtendsModule() {
|
||||
configExtendsModule ??= import("tsx/esm/api").then(({ tsImport }) =>
|
||||
tsImport("../plugins/loader/config-extends.ts", import.meta.url),
|
||||
)
|
||||
return configExtendsModule
|
||||
}
|
||||
|
||||
/**
|
||||
* The configuration the build uses: the config file with its `extends` applied. A config
|
||||
* without `extends` is returned as read. Read-only commands (list, status, doctor, info,
|
||||
* install, prune) use this; commands that edit the file keep using readPluginsJson(), which
|
||||
* returns only what the user's file contains. Throws a clear error when a base can't be loaded.
|
||||
*/
|
||||
export async function resolveEffectiveConfig(data, configPath = resolveConfigPath()) {
|
||||
if (!configExtends(data)) return data
|
||||
const { resolveExtends } = await loadConfigExtendsModule()
|
||||
return resolveExtends(data, configPath)
|
||||
}
|
||||
|
||||
/** readPluginsJson() with `extends` applied; reports a base that can't be loaded and returns null. */
|
||||
export async function readEffectivePluginsJson() {
|
||||
const data = readPluginsJson()
|
||||
try {
|
||||
return await resolveEffectiveConfig(data)
|
||||
} catch (err) {
|
||||
console.error(`✗ ${path.basename(resolveConfigPath())}: ${String(err?.message ?? err)}`)
|
||||
process.exitCode = 1
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Local files the config extends (directly or through other bases), for `--serve` to watch.
|
||||
* Empty when it extends nothing or a base can't be loaded (the build reports that).
|
||||
*/
|
||||
export async function extendedConfigFiles() {
|
||||
const data = readPluginsJson()
|
||||
if (!configExtends(data)) return []
|
||||
try {
|
||||
const { localExtendsFiles } = await loadConfigExtendsModule()
|
||||
return await localExtendsFiles(data, resolveConfigPath())
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
/** Path of the config file the CLI reads from (may be a default/legacy file). */
|
||||
export function getConfigReadPath() {
|
||||
return resolveConfigPath()
|
||||
|
||||
@@ -4,6 +4,11 @@ import os from "os"
|
||||
import { styleText } from "util"
|
||||
import {
|
||||
readPluginsJson,
|
||||
readEffectivePluginsJson,
|
||||
resolveEffectiveConfig,
|
||||
configExtends,
|
||||
loadConfigExtendsModule,
|
||||
getConfigReadPath,
|
||||
writePluginsJson,
|
||||
readLockfile,
|
||||
writeLockfile,
|
||||
@@ -128,6 +133,67 @@ function resolveConfigEntryOrReport(json, name) {
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* For commands that edit quartz.config.yaml: `json` is the user's own file (what gets written
|
||||
* back) and `effective` the configuration the build uses (with `extends` applied; the same
|
||||
* object without it). Plugins are looked up in `effective`; changes go to the user's entry for
|
||||
* the plugin (see overlayEntryFor), never the merged configuration. Returns null after
|
||||
* reporting when a base can't be loaded.
|
||||
*/
|
||||
async function readConfigForEdit() {
|
||||
const json = readPluginsJson()
|
||||
if (!configExtends(json)) return { json, effective: json, extending: false }
|
||||
try {
|
||||
const effective = await resolveEffectiveConfig(json, getConfigReadPath())
|
||||
const { pluginMatchKey } = await loadConfigExtendsModule()
|
||||
return { json, effective, extending: true, matchKey: pluginMatchKey }
|
||||
} catch (err) {
|
||||
console.log(
|
||||
styleText(
|
||||
"red",
|
||||
`✗ ${path.basename(getConfigReadPath())}: ${String(err?.message ?? err)} — nothing changed`,
|
||||
),
|
||||
)
|
||||
markFailed()
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The user's entry for a plugin of the merged configuration (matched as `extends` merges
|
||||
* entries; the last one wins when there are several). With `create`, an entry
|
||||
* `{ source }` is added when the user's file has none, which then changes only what is set in it.
|
||||
*/
|
||||
function overlayEntryFor(edit, mergedEntry, create = false) {
|
||||
if (!edit.extending) return mergedEntry
|
||||
if (edit.json.plugins == null) edit.json.plugins = []
|
||||
if (!Array.isArray(edit.json.plugins)) {
|
||||
throw new Error(`"plugins" in ${path.basename(getConfigReadPath())} must be a list`)
|
||||
}
|
||||
const key = edit.matchKey(mergedEntry.source)
|
||||
let entry = edit.json.plugins.findLast((e) => {
|
||||
try {
|
||||
return e?.source !== undefined && edit.matchKey(e.source) === key
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (!entry && create) {
|
||||
entry = { source: mergedEntry.source }
|
||||
edit.json.plugins.push(entry)
|
||||
}
|
||||
return entry
|
||||
}
|
||||
|
||||
function hasOptionPath(obj, segments) {
|
||||
let node = obj
|
||||
for (const segment of segments) {
|
||||
if (node === null || typeof node !== "object" || !(segment in node)) return false
|
||||
node = node[segment]
|
||||
}
|
||||
return node !== undefined && node !== null
|
||||
}
|
||||
|
||||
/** Read the manifest (`quartz` field of package.json) of a configured plugin, if installed. */
|
||||
function readEntryManifest(source) {
|
||||
const dir = resolvePluginDir(source)
|
||||
@@ -176,11 +242,13 @@ async function cloneAtCommitAsync({ url, ref, commit, dir }) {
|
||||
/**
|
||||
* Move a shallow clone to a pinned commit. The commit is fetched by SHA (GitHub and most hosts
|
||||
* allow fetching reachable commits), so a pin that is no longer the branch tip works (#2559).
|
||||
* The checkout is forced: the plugin directory is Quartz's clone, and its build (npm install)
|
||||
* rewrites tracked files such as package-lock.json, which a restored CI cache keeps (#2639).
|
||||
*/
|
||||
async function checkoutPinnedCommitAsync(dir, commit) {
|
||||
export async function checkoutPinnedCommitAsync(dir, commit) {
|
||||
assertCommit(commit)
|
||||
await gitAsync(["fetch", "--depth", "1", "origin", commit], { cwd: dir })
|
||||
await gitAsync(["checkout", "--quiet", commit], { cwd: dir })
|
||||
await gitAsync(["checkout", "--quiet", "--force", commit], { cwd: dir })
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -425,7 +493,7 @@ async function regeneratePluginIndex() {
|
||||
// npm plugins in the config are part of the index too (they used to be dropped here until the
|
||||
// next build regenerated it); the generator is shared with the build, see plugin-index.js
|
||||
const npmPackages = []
|
||||
for (const entry of readPluginsJson()?.plugins ?? []) {
|
||||
for (const entry of (await readEffectivePluginsJson())?.plugins ?? []) {
|
||||
if (builtinMessage(entry.source)) continue
|
||||
try {
|
||||
const parsed = parseGitSource(entry.source)
|
||||
@@ -453,7 +521,9 @@ export async function handlePluginInstallUnified({
|
||||
|
||||
// Plugins that are built into core now (crawl-links, remove-draft, content-index) are never
|
||||
// cloned or built, even if the config or the lockfile still lists them.
|
||||
const rawPluginsJson = readPluginsJson()
|
||||
// with `extends`, the plugins of the merged configuration (as the build loads them)
|
||||
const rawPluginsJson = await readEffectivePluginsJson()
|
||||
if (!rawPluginsJson && configExtends(readPluginsJson())) return
|
||||
const pluginsJson = rawPluginsJson && {
|
||||
...rawPluginsJson,
|
||||
plugins: (rawPluginsJson.plugins ?? []).filter((entry) => !builtinMessage(entry.source)),
|
||||
@@ -1474,8 +1544,12 @@ export async function handlePluginAdd(
|
||||
fs.mkdirSync(PLUGINS_DIR, { recursive: true })
|
||||
}
|
||||
|
||||
const pluginsJson = readPluginsJson()
|
||||
const configured = pluginsJson?.plugins ?? []
|
||||
const edit = await readConfigForEdit()
|
||||
if (!edit) return
|
||||
// added entries go to the user's file; "already configured" also covers plugins that come
|
||||
// from an `extends` base
|
||||
const pluginsJson = edit.json
|
||||
const configured = Array.isArray(edit.effective?.plugins) ? edit.effective.plugins : []
|
||||
|
||||
const addedPlugins = []
|
||||
let hadFailure = false
|
||||
@@ -1694,7 +1768,11 @@ export async function handlePluginAdd(
|
||||
writeLockfile(lockfile)
|
||||
}
|
||||
|
||||
if (pluginsJson?.plugins && addedPlugins.length > 0) {
|
||||
// an extending config may have no `plugins:` yet
|
||||
if (pluginsJson && pluginsJson.plugins == null && addedPlugins.length > 0) {
|
||||
pluginsJson.plugins = []
|
||||
}
|
||||
if (Array.isArray(pluginsJson?.plugins) && addedPlugins.length > 0) {
|
||||
for (const { pluginDir, source, configSource } of addedPlugins) {
|
||||
const manifest = readManifestFromPackageJson(pluginDir)
|
||||
const newEntry = {
|
||||
@@ -1772,13 +1850,36 @@ export async function handlePluginAdd(
|
||||
|
||||
export async function handlePluginRemove(names) {
|
||||
const lockfile = readLockfile() ?? { version: "1.0.0", plugins: {} }
|
||||
const pluginsJson = readPluginsJson()
|
||||
const edit = await readConfigForEdit()
|
||||
if (!edit) return
|
||||
const pluginsJson = edit.json
|
||||
// With `extends`: the plugins the bases configure (without the user's entries). Those can't
|
||||
// be removed from the user's file, only disabled.
|
||||
const basePlugins = edit.extending
|
||||
? ((await resolveEffectiveConfig({ ...pluginsJson, plugins: [] }, getConfigReadPath()))
|
||||
.plugins ?? [])
|
||||
: []
|
||||
let lockfileChanged = false
|
||||
let configChanged = false
|
||||
let removedFiles = false
|
||||
const removedSources = []
|
||||
|
||||
for (const name of names) {
|
||||
const fromBase = findConfigEntries(basePlugins, name, nameHelpers).indices
|
||||
if (fromBase.length > 0) {
|
||||
const label = extractPluginName(basePlugins[fromBase[0]].source)
|
||||
console.log(
|
||||
styleText(
|
||||
"red",
|
||||
`✗ ${label} comes from the configuration ${path.basename(getConfigReadPath())} extends, so it can't be removed from your file.`,
|
||||
),
|
||||
)
|
||||
console.log(
|
||||
styleText("gray", ` Turn it off with 'npx quartz plugin disable ${label}' instead.`),
|
||||
)
|
||||
markFailed()
|
||||
continue
|
||||
}
|
||||
// Prefer the config entry (accepts short names such as "explorer").
|
||||
const { indices } = findConfigEntries(pluginsJson?.plugins ?? [], name, nameHelpers)
|
||||
const configIndex = indices.length === 1 ? indices[0] : -1
|
||||
@@ -1890,7 +1991,9 @@ export async function handlePluginRemove(names) {
|
||||
}
|
||||
|
||||
async function setEnabled(names, enabled) {
|
||||
const json = readPluginsJson()
|
||||
const edit = await readConfigForEdit()
|
||||
if (!edit) return
|
||||
const json = edit.json
|
||||
const verb = enabled ? "enable" : "disable"
|
||||
if (!json) {
|
||||
console.log(styleText("red", `✗ No quartz.config.yaml found. Cannot ${verb} plugins.`))
|
||||
@@ -1901,12 +2004,13 @@ async function setEnabled(names, enabled) {
|
||||
let changed = false
|
||||
for (const name of names) {
|
||||
const builtin = builtinMessage(name)
|
||||
if (builtin && !(json.plugins ?? []).some((e) => officialPluginName(e.source) === name)) {
|
||||
const plugins = Array.isArray(edit.effective.plugins) ? edit.effective.plugins : []
|
||||
if (builtin && !plugins.some((e) => officialPluginName(e.source) === name)) {
|
||||
console.log(styleText("yellow", `⚠ ${builtin}`))
|
||||
markFailed()
|
||||
continue
|
||||
}
|
||||
const resolved = resolveConfigEntryOrReport(json, name)
|
||||
const resolved = resolveConfigEntryOrReport(edit.effective, name)
|
||||
if (!resolved) continue
|
||||
const { entry } = resolved
|
||||
const label = extractPluginName(entry.source)
|
||||
@@ -1915,7 +2019,8 @@ async function setEnabled(names, enabled) {
|
||||
console.log(styleText("gray", `✓ ${label} is already ${verb}d`))
|
||||
continue
|
||||
}
|
||||
entry.enabled = enabled
|
||||
// with `extends`: set in the user's entry for the plugin (added if needed)
|
||||
overlayEntryFor(edit, entry, true).enabled = enabled
|
||||
changed = true
|
||||
console.log(styleText("green", `✓ ${enabled ? "Enabled" : "Disabled"} ${label}`))
|
||||
if (
|
||||
@@ -1960,14 +2065,18 @@ function printOptionIssues(issues, label) {
|
||||
}
|
||||
|
||||
export async function handlePluginConfig(name, options = {}) {
|
||||
const json = readPluginsJson()
|
||||
const edit = await readConfigForEdit()
|
||||
if (!edit) return
|
||||
const json = edit.json
|
||||
if (!json) {
|
||||
console.log(styleText("red", "✗ No quartz.config.yaml found."))
|
||||
markFailed()
|
||||
return
|
||||
}
|
||||
|
||||
const resolved = resolveConfigEntryOrReport(json, name)
|
||||
// `entry` is the plugin as the build sees it (merged with `extends` bases); changes go to
|
||||
// `target`, the user's own entry for it
|
||||
const resolved = resolveConfigEntryOrReport(edit.effective, name)
|
||||
if (!resolved) return
|
||||
const { entry } = resolved
|
||||
const label = extractPluginName(entry.source)
|
||||
@@ -1977,7 +2086,8 @@ export async function handlePluginConfig(name, options = {}) {
|
||||
const unsets = [options.unset ?? []].flat().filter((v) => v !== undefined)
|
||||
|
||||
if (sets.length > 0 || unsets.length > 0) {
|
||||
if (!entry.options || typeof entry.options !== "object") entry.options = {}
|
||||
const target = overlayEntryFor(edit, entry, true)
|
||||
if (!target.options || typeof target.options !== "object") target.options = {}
|
||||
let changed = false
|
||||
for (const assignment of sets) {
|
||||
const eqIndex = String(assignment).indexOf("=")
|
||||
@@ -1994,7 +2104,7 @@ export async function handlePluginConfig(name, options = {}) {
|
||||
continue
|
||||
}
|
||||
const value = parseCliValue(assignment.slice(eqIndex + 1))
|
||||
setOptionPath(entry.options, segments, value)
|
||||
setOptionPath(target.options, segments, value)
|
||||
changed = true
|
||||
console.log(
|
||||
styleText("green", `✓ Set ${label}.${segments.join(".")} = ${JSON.stringify(value)}`),
|
||||
@@ -2008,7 +2118,29 @@ export async function handlePluginConfig(name, options = {}) {
|
||||
}
|
||||
for (const keyPath of unsets) {
|
||||
const segments = parseOptionPath(String(keyPath))
|
||||
if (unsetOptionPath(entry.options, segments)) {
|
||||
if (edit.extending) {
|
||||
// drop the user's value, then reset a value a base still sets with `null` (merging
|
||||
// removes the key, so the plugin's default applies)
|
||||
const hadOwn = unsetOptionPath(target.options, segments)
|
||||
const merged = await resolveEffectiveConfig(json, getConfigReadPath())
|
||||
const key = edit.matchKey(entry.source)
|
||||
const now = (merged.plugins ?? []).findLast((e) => edit.matchKey(e.source) === key)
|
||||
const fromBase = hasOptionPath(now?.options, segments)
|
||||
if (fromBase) setOptionPath(target.options, segments, null)
|
||||
if (hadOwn || fromBase) {
|
||||
changed = true
|
||||
console.log(
|
||||
styleText(
|
||||
"green",
|
||||
`✓ Unset ${label}.${segments.join(".")} (plugin default applies${fromBase ? "; null overrides the extended config" : ""})`,
|
||||
),
|
||||
)
|
||||
} else {
|
||||
console.log(styleText("yellow", `⚠ ${label} has no option "${keyPath}" set`))
|
||||
}
|
||||
continue
|
||||
}
|
||||
if (unsetOptionPath(target.options, segments)) {
|
||||
changed = true
|
||||
console.log(
|
||||
styleText("green", `✓ Unset ${label}.${segments.join(".")} (plugin default applies)`),
|
||||
@@ -2100,7 +2232,8 @@ function collectUntrackedEntries(pluginsJson, lockfile) {
|
||||
|
||||
export async function handlePluginList() {
|
||||
const lockfile = readLockfile()
|
||||
const pluginsJson = readPluginsJson()
|
||||
const pluginsJson = await readEffectivePluginsJson()
|
||||
if (!pluginsJson && configExtends(readPluginsJson())) return
|
||||
const { npm, missing } = collectUntrackedEntries(pluginsJson, lockfile)
|
||||
const lockEntries = Object.entries(lockfile?.plugins ?? {})
|
||||
|
||||
@@ -2220,7 +2353,8 @@ export async function handlePluginList() {
|
||||
|
||||
export async function handlePluginStatus() {
|
||||
const lockfile = readLockfile() ?? { version: "1.0.0", plugins: {} }
|
||||
const pluginsJson = readPluginsJson()
|
||||
const pluginsJson = await readEffectivePluginsJson()
|
||||
if (!pluginsJson && configExtends(readPluginsJson())) return
|
||||
const { npm } = collectUntrackedEntries(pluginsJson, lockfile)
|
||||
if (Object.keys(lockfile.plugins).length === 0 && npm.length === 0) {
|
||||
console.log(styleText("gray", "No plugins installed"))
|
||||
@@ -2457,7 +2591,23 @@ export async function handlePluginDoctor({ verbose = false, fix = false } = {})
|
||||
report("info", null, `using ${configLabel} (no quartz.config.yaml yet)`)
|
||||
}
|
||||
|
||||
if (!Array.isArray(config.data?.plugins)) {
|
||||
// With `extends`, check the merged configuration (what the build loads); --fix still edits
|
||||
// only this file.
|
||||
const extending = configExtends(config.data)
|
||||
const effectiveOf = async (data) => (extending ? resolveEffectiveConfig(data, config.path) : data)
|
||||
let effective
|
||||
try {
|
||||
effective = await effectiveOf(config.data)
|
||||
} catch (err) {
|
||||
report("error", configLabel, `extends: ${String(err?.message ?? err)}`)
|
||||
markFailed()
|
||||
return
|
||||
}
|
||||
if (extending) {
|
||||
report("info", null, `${configLabel} uses extends; checking the merged configuration`)
|
||||
}
|
||||
|
||||
if (!Array.isArray(effective?.plugins)) {
|
||||
report("error", configLabel, "`plugins` must be a list")
|
||||
markFailed()
|
||||
return
|
||||
@@ -2472,6 +2622,7 @@ export async function handlePluginDoctor({ verbose = false, fix = false } = {})
|
||||
for (const change of changes) console.log(styleText("green", `✓ ${change}`))
|
||||
console.log()
|
||||
config.data = migrated
|
||||
effective = await effectiveOf(migrated)
|
||||
} else {
|
||||
for (const { name, key } of migrations) {
|
||||
report(
|
||||
@@ -2485,9 +2636,11 @@ export async function handlePluginDoctor({ verbose = false, fix = false } = {})
|
||||
}
|
||||
}
|
||||
const absorbed = new Set(
|
||||
migrations.filter((m) => m.name !== "note-properties").map((m) => m.entry),
|
||||
findBuiltinMigrations(effective)
|
||||
.filter((m) => m.name !== "note-properties")
|
||||
.map((m) => m.entry),
|
||||
)
|
||||
const plugins = config.data.plugins.filter((entry) => !absorbed.has(entry))
|
||||
const plugins = effective.plugins.filter((entry) => !absorbed.has(entry))
|
||||
|
||||
const lockfile = readLockfile()
|
||||
if (fs.existsSync(LOCKFILE_PATH) && !lockfile) {
|
||||
@@ -2667,7 +2820,7 @@ export async function handlePluginDoctor({ verbose = false, fix = false } = {})
|
||||
// satisfied by the built-in: its entries were absorbed above.
|
||||
const builtinKey = builtinKeyFor(dep)
|
||||
if (builtinKey) {
|
||||
const builtin = describeBuiltins(config.data.configuration).find(
|
||||
const builtin = describeBuiltins(effective.configuration).find(
|
||||
(b) => b.key === builtinKey,
|
||||
)
|
||||
if (builtin && !builtin.enabled) {
|
||||
@@ -2769,7 +2922,13 @@ export async function handlePluginPrune({ dryRun = false } = {}) {
|
||||
return
|
||||
}
|
||||
|
||||
const pluginsJson = readPluginsJson()
|
||||
// plugins of the merged configuration: a plugin from an `extends` base is not an orphan
|
||||
const pluginsJson = await readEffectivePluginsJson()
|
||||
if (!pluginsJson && configExtends(readPluginsJson())) {
|
||||
console.log(styleText("red", "✗ Not pruning: the configuration could not be resolved."))
|
||||
markFailed()
|
||||
return
|
||||
}
|
||||
const configuredNames = new Set(
|
||||
(pluginsJson?.plugins ?? []).map((entry) => extractPluginName(entry.source)),
|
||||
)
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
import test, { describe, beforeEach, afterEach } from "node:test"
|
||||
import assert from "node:assert"
|
||||
import { execSync } from "child_process"
|
||||
import { execSync, spawnSync } from "child_process"
|
||||
import fs from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
import { buildPluginAsync, linkPeerPlugins, pluginSourceChanged } from "./plugin-git-handlers.js"
|
||||
import { pathToFileURL } from "url"
|
||||
import YAML from "yaml"
|
||||
import {
|
||||
buildPluginAsync,
|
||||
checkoutPinnedCommitAsync,
|
||||
linkPeerPlugins,
|
||||
pluginSourceChanged,
|
||||
} from "./plugin-git-handlers.js"
|
||||
|
||||
let root
|
||||
let hostPreact
|
||||
@@ -161,3 +168,129 @@ describe("pluginSourceChanged", () => {
|
||||
assert.strictEqual(pluginSourceChanged(priorEntry, "github:owner/new-repo"), true)
|
||||
})
|
||||
})
|
||||
|
||||
describe("checkoutPinnedCommitAsync", () => {
|
||||
const git = (cwd, cmd) =>
|
||||
execSync(`git -c user.name=t -c user.email=t@t -c commit.gpgsign=false ${cmd}`, {
|
||||
cwd,
|
||||
stdio: "pipe",
|
||||
timeout: 30000,
|
||||
})
|
||||
.toString()
|
||||
.trim()
|
||||
|
||||
function makeRemote() {
|
||||
const remote = path.join(root, "remote")
|
||||
fs.mkdirSync(remote)
|
||||
git(remote, "init -q -b main")
|
||||
git(remote, "config uploadpack.allowAnySHA1InWant true")
|
||||
fs.writeFileSync(path.join(remote, "package-lock.json"), `{ "v": 1 }`)
|
||||
git(remote, "add -A")
|
||||
git(remote, "commit -q -m one")
|
||||
const first = git(remote, "rev-parse HEAD")
|
||||
fs.writeFileSync(path.join(remote, "package-lock.json"), `{ "v": 2 }`)
|
||||
git(remote, "commit -q -am two")
|
||||
return { remote, first }
|
||||
}
|
||||
|
||||
test("moves to a pinned commit that is not the branch tip", async () => {
|
||||
const { remote, first } = makeRemote()
|
||||
const dir = path.join(root, "plugin")
|
||||
git(root, `clone -q --depth 1 ${pathToFileURL(remote).href} "${dir}"`)
|
||||
await checkoutPinnedCommitAsync(dir, first)
|
||||
assert.strictEqual(git(dir, "rev-parse HEAD"), first)
|
||||
})
|
||||
|
||||
// a plugin's build (npm install) rewrites its tracked package-lock.json; a restored CI cache
|
||||
// keeps that change, and the checkout refused to move ("commit your changes or stash them")
|
||||
test("moves even when the plugin's build left tracked files changed (#2639)", async () => {
|
||||
const { remote, first } = makeRemote()
|
||||
const dir = path.join(root, "plugin")
|
||||
git(root, `clone -q --depth 1 ${pathToFileURL(remote).href} "${dir}"`)
|
||||
fs.writeFileSync(path.join(dir, "package-lock.json"), `{ "v": "rewritten by npm" }`)
|
||||
await checkoutPinnedCommitAsync(dir, first)
|
||||
assert.strictEqual(git(dir, "rev-parse HEAD"), first)
|
||||
assert.strictEqual(fs.readFileSync(path.join(dir, "package-lock.json"), "utf-8"), `{ "v": 1 }`)
|
||||
})
|
||||
})
|
||||
|
||||
describe("plugin commands with an extending config", () => {
|
||||
const cli = path.resolve(import.meta.dirname, "..", "bootstrap-cli.mjs")
|
||||
// stdout and stderr, whatever the exit code (doctor fails on npm plugins that aren't installed)
|
||||
const run = (dir, args) => {
|
||||
const result = spawnSync(process.execPath, [cli, ...args.split(" ")], {
|
||||
cwd: dir,
|
||||
encoding: "utf-8",
|
||||
timeout: 60_000,
|
||||
env: { ...process.env, QUARTZ_CONFIG_PATH: "" },
|
||||
})
|
||||
return { output: result.stdout + result.stderr, status: result.status }
|
||||
}
|
||||
const site = () => {
|
||||
const dir = path.join(root, "site")
|
||||
fs.mkdirSync(dir, { recursive: true })
|
||||
fs.writeFileSync(path.join(dir, "package.json"), `{ "name": "site", "version": "5.3.0" }`)
|
||||
fs.writeFileSync(
|
||||
path.join(dir, "quartz.config.default.yaml"),
|
||||
[
|
||||
"configuration:",
|
||||
" pageTitle: Default",
|
||||
"plugins:",
|
||||
' - source: "@quartz-community/graph"',
|
||||
" enabled: true",
|
||||
" options: { depth: 1, scale: 2 }",
|
||||
' - source: "@quartz-community/comments"',
|
||||
" enabled: false",
|
||||
"",
|
||||
].join("\n"),
|
||||
)
|
||||
fs.writeFileSync(
|
||||
path.join(dir, "quartz.config.yaml"),
|
||||
[
|
||||
"extends: default",
|
||||
"plugins:",
|
||||
' - source: "@quartz-community/graph"',
|
||||
" options: { depth: 3 }",
|
||||
"",
|
||||
].join("\n"),
|
||||
)
|
||||
return dir
|
||||
}
|
||||
const read = (dir) => fs.readFileSync(path.join(dir, "quartz.config.yaml"), "utf-8")
|
||||
|
||||
test("list and doctor read the merged configuration", () => {
|
||||
const dir = site()
|
||||
const list = run(dir, "plugin list").output
|
||||
assert.match(list, /@quartz-community\/comments .*disabled/)
|
||||
assert.match(list, /@quartz-community\/graph .*enabled/)
|
||||
const doctor = run(dir, "plugin doctor").output
|
||||
assert.match(doctor, /Checking plugins/)
|
||||
assert.doesNotMatch(doctor, /no `enabled` field/)
|
||||
})
|
||||
|
||||
test("enable, disable and config change only the user's entries", () => {
|
||||
const dir = site()
|
||||
run(dir, "plugin enable comments")
|
||||
run(dir, "plugin disable graph")
|
||||
run(dir, "plugin config graph --unset scale")
|
||||
run(dir, "plugin config graph --unset depth")
|
||||
const out = read(dir)
|
||||
assert.match(out, /^extends: default$/m)
|
||||
assert.doesNotMatch(out, /pageTitle/) // the merged configuration is not written back
|
||||
const data = YAML.parse(out)
|
||||
assert.deepStrictEqual(data.plugins, [
|
||||
// the base sets both: null drops them from the merged options, so the plugin's defaults
|
||||
// apply (the user's own depth: 3 is gone too)
|
||||
{ source: "@quartz-community/graph", options: { depth: null, scale: null }, enabled: false },
|
||||
{ source: "@quartz-community/comments", enabled: true },
|
||||
])
|
||||
})
|
||||
|
||||
test("remove refuses a plugin that comes from a base", () => {
|
||||
const dir = site()
|
||||
const { output, status } = run(dir, "plugin remove comments")
|
||||
assert.match(output, /comes from the configuration/)
|
||||
assert.strictEqual(status, 1)
|
||||
assert.doesNotMatch(read(dir), /comments/)
|
||||
})
|
||||
})
|
||||
@@ -5,7 +5,15 @@
|
||||
// see plugin-validation.d.ts).
|
||||
|
||||
/** Top-level keys allowed on a plugin entry (mirrors quartz-plugins.schema.json). */
|
||||
export const PLUGIN_ENTRY_KEYS = ["source", "enabled", "options", "order", "layout"]
|
||||
export const PLUGIN_ENTRY_KEYS = [
|
||||
"source",
|
||||
"enabled",
|
||||
"options",
|
||||
"order",
|
||||
"before",
|
||||
"after",
|
||||
"layout",
|
||||
]
|
||||
|
||||
/** Keys allowed on an object-form `source`. */
|
||||
export const SOURCE_OBJECT_KEYS = ["repo", "subdir", "ref", "name"]
|
||||
|
||||
@@ -198,6 +198,36 @@ describe("validatePluginEntry", () => {
|
||||
)
|
||||
})
|
||||
|
||||
test("accepts before, after and every layout key", () => {
|
||||
assert.deepStrictEqual(
|
||||
validatePluginEntry({
|
||||
source: "@quartz-community/description",
|
||||
enabled: true,
|
||||
order: 60,
|
||||
before: "Links",
|
||||
after: ["obsidian-flavored-markdown"],
|
||||
layout: {
|
||||
position: "right",
|
||||
priority: 5,
|
||||
display: "desktop-only",
|
||||
condition: "not-index",
|
||||
group: "toolbar",
|
||||
groupOptions: { grow: true },
|
||||
},
|
||||
}),
|
||||
[],
|
||||
)
|
||||
})
|
||||
|
||||
test("an unknown key without a close match lists the allowed keys", () => {
|
||||
assert.deepStrictEqual(
|
||||
validatePluginEntry({ source: "x/y", enabled: true, zzzzzz: 1 }).map((i) => i.message),
|
||||
[
|
||||
'unknown key "zzzzzz" is ignored (allowed: source, enabled, options, order, before, after, layout)',
|
||||
],
|
||||
)
|
||||
})
|
||||
|
||||
test("catches typoed keys and a missing enabled flag", () => {
|
||||
const issues = validatePluginEntry({ source: "x/y", enable: true, option: {} })
|
||||
const messages = issues.map((i) => i.message).join("\n")
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import test, { describe } from "node:test"
|
||||
import assert from "node:assert"
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import { createRequire } from "node:module"
|
||||
import YAML from "yaml"
|
||||
import { validatePluginOptions } from "./plugin-validation.js"
|
||||
|
||||
const root = path.resolve(import.meta.dirname, "..", "..")
|
||||
const templatesDir = path.join(import.meta.dirname, "templates")
|
||||
const configs = [
|
||||
path.join(root, "quartz.config.default.yaml"),
|
||||
...fs
|
||||
.readdirSync(templatesDir)
|
||||
.filter((f) => f.endsWith(".yaml"))
|
||||
.map((f) => path.join(templatesDir, f)),
|
||||
]
|
||||
const require = createRequire(path.join(root, "package.json"))
|
||||
|
||||
function manifestOf(source) {
|
||||
try {
|
||||
return JSON.parse(fs.readFileSync(require.resolve(`${source}/package.json`), "utf8")).quartz
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of configs) {
|
||||
const name = path.relative(root, file)
|
||||
const plugins = YAML.parse(fs.readFileSync(file, "utf8")).plugins ?? []
|
||||
const bySource = new Map(plugins.map((entry) => [entry.source, entry]))
|
||||
|
||||
describe(name, () => {
|
||||
test("runs GitHubFlavoredMarkdown before ObsidianFlavoredMarkdown", () => {
|
||||
const gfm = bySource.get("@quartz-community/github-flavored-markdown")
|
||||
const ofm = bySource.get("@quartz-community/obsidian-flavored-markdown")
|
||||
if (!gfm || !ofm) return
|
||||
assert.ok(gfm.order < ofm.order, `GFM order ${gfm.order} must be below OFM ${ofm.order}`)
|
||||
})
|
||||
|
||||
test("sets only options the plugins have", () => {
|
||||
const problems = []
|
||||
for (const entry of plugins) {
|
||||
if (typeof entry.source !== "string" || !entry.options) continue
|
||||
const manifest = manifestOf(entry.source)
|
||||
if (!manifest) continue
|
||||
for (const issue of validatePluginOptions(entry.options, manifest)) {
|
||||
problems.push(`${entry.source}: ${issue.message}`)
|
||||
}
|
||||
}
|
||||
assert.deepStrictEqual(problems, [])
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -25,17 +25,17 @@ configuration:
|
||||
lightMode:
|
||||
light: "#faf8f8"
|
||||
lightgray: "#e5e5e5"
|
||||
gray: "#b8b8b8"
|
||||
gray: "#727272"
|
||||
darkgray: "#4e4e4e"
|
||||
dark: "#2b2b2b"
|
||||
secondary: "#284b63"
|
||||
tertiary: "#84a59d"
|
||||
tertiary: "#587971"
|
||||
highlight: rgba(143, 159, 169, 0.15)
|
||||
textHighlight: "#fff23688"
|
||||
darkMode:
|
||||
light: "#161618"
|
||||
lightgray: "#393639"
|
||||
gray: "#646464"
|
||||
gray: "#7f7f7f"
|
||||
darkgray: "#d4d4d4"
|
||||
dark: "#ebebec"
|
||||
secondary: "#7b97aa"
|
||||
@@ -70,10 +70,10 @@ plugins:
|
||||
options:
|
||||
enableInHtmlEmbed: false
|
||||
enableCheckbox: true
|
||||
order: 30
|
||||
order: 40
|
||||
- source: "@quartz-community/github-flavored-markdown"
|
||||
enabled: true
|
||||
order: 40
|
||||
order: 30
|
||||
- source: "@quartz-community/table-of-contents"
|
||||
enabled: true
|
||||
order: 50
|
||||
@@ -97,8 +97,6 @@ plugins:
|
||||
- source: "@quartz-community/roam"
|
||||
enabled: false
|
||||
order: 92
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: false
|
||||
options:
|
||||
|
||||
@@ -25,17 +25,17 @@ configuration:
|
||||
lightMode:
|
||||
light: "#faf8f8"
|
||||
lightgray: "#e5e5e5"
|
||||
gray: "#b8b8b8"
|
||||
gray: "#727272"
|
||||
darkgray: "#4e4e4e"
|
||||
dark: "#2b2b2b"
|
||||
secondary: "#284b63"
|
||||
tertiary: "#84a59d"
|
||||
tertiary: "#587971"
|
||||
highlight: rgba(143, 159, 169, 0.15)
|
||||
textHighlight: "#fff23688"
|
||||
darkMode:
|
||||
light: "#161618"
|
||||
lightgray: "#393639"
|
||||
gray: "#646464"
|
||||
gray: "#7f7f7f"
|
||||
darkgray: "#d4d4d4"
|
||||
dark: "#ebebec"
|
||||
secondary: "#7b97aa"
|
||||
@@ -70,10 +70,10 @@ plugins:
|
||||
options:
|
||||
enableInHtmlEmbed: false
|
||||
enableCheckbox: true
|
||||
order: 30
|
||||
order: 40
|
||||
- source: "@quartz-community/github-flavored-markdown"
|
||||
enabled: true
|
||||
order: 40
|
||||
order: 30
|
||||
- source: "@quartz-community/table-of-contents"
|
||||
enabled: true
|
||||
order: 50
|
||||
@@ -97,8 +97,6 @@ plugins:
|
||||
- source: "@quartz-community/roam"
|
||||
enabled: false
|
||||
order: 92
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: false
|
||||
options:
|
||||
|
||||
@@ -26,17 +26,17 @@ configuration:
|
||||
lightMode:
|
||||
light: "#faf8f8"
|
||||
lightgray: "#e5e5e5"
|
||||
gray: "#b8b8b8"
|
||||
gray: "#727272"
|
||||
darkgray: "#4e4e4e"
|
||||
dark: "#2b2b2b"
|
||||
secondary: "#284b63"
|
||||
tertiary: "#84a59d"
|
||||
tertiary: "#587971"
|
||||
highlight: rgba(143, 159, 169, 0.15)
|
||||
textHighlight: "#fff23688"
|
||||
darkMode:
|
||||
light: "#161618"
|
||||
lightgray: "#393639"
|
||||
gray: "#646464"
|
||||
gray: "#7f7f7f"
|
||||
darkgray: "#d4d4d4"
|
||||
dark: "#ebebec"
|
||||
secondary: "#7b97aa"
|
||||
@@ -71,10 +71,10 @@ plugins:
|
||||
options:
|
||||
enableInHtmlEmbed: false
|
||||
enableCheckbox: true
|
||||
order: 30
|
||||
order: 40
|
||||
- source: "@quartz-community/github-flavored-markdown"
|
||||
enabled: true
|
||||
order: 40
|
||||
order: 30
|
||||
- source: "@quartz-community/table-of-contents"
|
||||
enabled: true
|
||||
order: 50
|
||||
@@ -98,8 +98,6 @@ plugins:
|
||||
- source: "@quartz-community/roam"
|
||||
enabled: false
|
||||
order: 92
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: false
|
||||
options:
|
||||
|
||||
@@ -25,17 +25,17 @@ configuration:
|
||||
lightMode:
|
||||
light: "#faf8f8"
|
||||
lightgray: "#e5e5e5"
|
||||
gray: "#b8b8b8"
|
||||
gray: "#727272"
|
||||
darkgray: "#4e4e4e"
|
||||
dark: "#2b2b2b"
|
||||
secondary: "#284b63"
|
||||
tertiary: "#84a59d"
|
||||
tertiary: "#587971"
|
||||
highlight: rgba(143, 159, 169, 0.15)
|
||||
textHighlight: "#fff23688"
|
||||
darkMode:
|
||||
light: "#161618"
|
||||
lightgray: "#393639"
|
||||
gray: "#646464"
|
||||
gray: "#7f7f7f"
|
||||
darkgray: "#d4d4d4"
|
||||
dark: "#ebebec"
|
||||
secondary: "#7b97aa"
|
||||
@@ -44,7 +44,7 @@ configuration:
|
||||
textHighlight: "#b3aa0288"
|
||||
links:
|
||||
markdownLinkResolution: shortest
|
||||
# disableBrokenWikilinks: false # Set true to add a "broken" CSS class to internal links whose target does not exist.
|
||||
# disableBrokenWikilinks: true # Set false to stop adding a "broken" CSS class to internal links whose target does not exist.
|
||||
contentIndex:
|
||||
enableSiteMap: true
|
||||
enableRSS: true
|
||||
@@ -75,16 +75,17 @@ plugins:
|
||||
callouts: true
|
||||
mermaid: true
|
||||
parseTags: true
|
||||
parseArrows: true
|
||||
parseBlockReferences: true
|
||||
enableInHtmlEmbed: false
|
||||
enableYouTubeEmbed: true
|
||||
enableVideoEmbed: true
|
||||
enableCheckbox: true
|
||||
order: 30
|
||||
foldHeadings: true
|
||||
foldLists: true
|
||||
order: 40
|
||||
- source: "@quartz-community/github-flavored-markdown"
|
||||
enabled: true
|
||||
order: 40
|
||||
order: 30
|
||||
- source: "@quartz-community/table-of-contents"
|
||||
enabled: true
|
||||
order: 50
|
||||
@@ -108,8 +109,6 @@ plugins:
|
||||
- source: "@quartz-community/roam"
|
||||
enabled: false
|
||||
order: 92
|
||||
- source: "@quartz-community/quartz-fonts"
|
||||
enabled: true
|
||||
- source: "@quartz-themes/core"
|
||||
enabled: true
|
||||
options:
|
||||
|
||||
Loaded 100 of 158 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user