Commit Graph

913 Commits

Author SHA1 Message Date
saberzero1 b1e5d3a7cc test: add regression tests for transclusion changes 2026-05-23 01:29:24 +02:00
saberzero1 4d715774e1 fix: properly handle multiple transclusions 2026-05-23 01:29:10 +02:00
saberzero1 0593c8cd6a fix: allow arbitrary transclusion 2026-05-23 01:18:30 +02:00
saberzero1 2a02240802 feat: preload static resources 2026-05-22 23:12:37 +02:00
saberzero1 cfcd9c18ac feat: split and hash inlined assets 2026-05-22 23:03:39 +02:00
saberzero1 cfba672f51 feat: split and hash static css 2026-05-22 22:42:06 +02:00
saberzero1 7fd0590a46 fix: improved plugin type resolution 2026-05-21 17:59:26 +02:00
saberzero1 21ea5895cb fix: improved plugin validation on install 2026-05-20 23:23:39 +02:00
saberzero1 c8f6e6dc14 feat(css): make styles layered by default 2026-04-28 17:25:37 +02:00
saberzero1 9fcc3f260c fix: handle EEXIST race in peer dependency symlink creation 2026-04-27 22:34:31 +02:00
saberzero1 efd9e8e095 feat(loader): prefer pre-built plugins 2026-04-27 22:03:23 +02:00
saberzero1 a85c3bd814 refactor(theme): use Obsidian CSS custom property names 2026-04-25 23:13:50 +02:00
saberzero1 710db1f161 fix(components): deduplicate plugin handler registration 2026-04-24 23:56:53 +02:00
saberzero1 b3082c32dc fix(path): improper redirects in subpath domain sites 2026-04-22 18:25:05 +02:00
saberzero1 dc88017b37 feat(404): try redirect to lowercase URL 2026-04-19 21:44:23 +02:00
saberzero1 f370898c56 fix(config): properly pass ts-based options to plugins 2026-04-17 22:14:36 +02:00
saberzero1 c32d11cb8b fix(build): remove extension-stripped slug aliases that pollute allSlugs
addVirtualPageSlugAliases injected extension-stripped aliases for
every PageType-registered extension into ctx.allSlugs (e.g. for
`Canvas.canvas` it added an alias `canvas`). Intended to help
`![[file.canvas]]` transclusions resolve to virtual pages, but:

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

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

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

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

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

normalizeRelativeURLs and its DOM-element sibling _rebaseHtmlElement
stay local - those operate on DOM Elements at runtime, not HAST AST
nodes, and belong with Quartz's DOM-specific code.
2026-04-17 02:27:48 +02:00
saberzero1 85563ffaab fix: wikilinks normalization and various slugging fixes 2026-04-17 00:35:28 +02:00
saberzero1 5bec6fb87b fix(popover): cache no longer always misses 2026-04-16 16:38:16 +02:00
saberzero1 64802f858b feat(cli): generalize concurrency flag 2026-04-11 15:51:50 +02:00
saberzero1 232781cbca chore: updated templates 2026-04-11 15:37:01 +02:00
saberzero1 b8b71edffe chore: updated templates 2026-04-11 14:22:48 +02:00
saberzero1 afa63033cc fix: make fileTrie last-write-wins; warn on slug collisions 2026-04-10 21:14:23 +02:00
saberzero1 341b800663 chore: updated path utils 2026-04-10 19:19:12 +02:00
Sara Lilith Slootmaker 2bf6cb655b chore: update links to leaflet bases plugin (#2347)
* chore: update leaflet bases plugin

* docs: update external link
2026-04-04 01:18:22 +02:00
saberzero1 0c50cca1f6 refactor: move vfile DataMap augmentation to @quartz-community/types 2026-04-03 15:41:11 +02:00
saberzero1 1d5d069174 fix: remove unused code in git handlers 2026-04-03 14:57:53 +02:00
saberzero1 2a6117142c feat: parallel git command handling 2026-04-03 14:39:30 +02:00
saberzero1 52e4257bda chore: linting 2026-04-03 14:20:25 +02:00
saberzero1 c0d3a30fdd chore: linting 2026-04-03 14:11:09 +02:00
saberzero1 00c4e392ff refactor(cli): remove migrate command 2026-04-03 13:59:43 +02:00
saberzero1 1342728ce2 chore: linting 2026-03-31 20:51:32 +02:00
saberzero1 3012aa01ea feat(cli): async update checking 2026-03-31 19:22:17 +02:00
saberzero1 db2cc6abca refactor: simplified CLI options 2026-03-31 18:50:27 +02:00
saberzero1 144b7d9a4a fix(cli): properly handle subdir plugin updates 2026-03-26 11:44:52 +01:00
saberzero1 2d579c0f9e feat(cli): added flags for plugin name and subdir 2026-03-25 22:18:51 +01:00
saberzero1 f881d5e332 fix(schema): added missing position option to plugin schema 2026-03-23 12:28:28 +01:00
saberzero1 b61e023759 chore: updated templates 2026-03-20 21:14:15 +01:00
saberzero1 d9bfbf876f refactor: move defaultDateType to CreatedModifiedDate plugin 2026-03-20 21:13:45 +01:00
saberzero1 db11f757c2 fix(pagetypes): prevent duplicate content 2026-03-18 17:45:56 +01:00
saberzero1 1b999a792f fix: expose base path via data-basepath attribute on body
Compute the base path from cfg.baseUrl and set it as a data attribute on
<body> so client-side scripts can resolve links correctly when Quartz is
deployed to a subdirectory (e.g., user.github.io/repository).
2026-03-18 11:51:06 +01:00
saberzero1 f2c2a31292 fix(cli): resolve subdir plugins during build installs 2026-03-18 02:39:45 +01:00
saberzero1 166b9c87d8 fix(cli): properly resolve subdir plugin installs 2026-03-18 01:56:48 +01:00
saberzero1 219bed15bf chore: updated plugin schema definition 2026-03-18 01:17:10 +01:00
saberzero1 7b85aa3464 fix(cli): extended options for plugin sources 2026-03-18 01:12:38 +01:00
saberzero1 51b05e79e2 feat: centralize native dep installation across plugins
Replace per-plugin npm install with a single aggregated npm install
in the quartz root. Plugins declaring requiresInstall in their quartz
manifest now have their peerDependencies collected and installed
together, letting npm resolve compatible versions across plugins.
2026-03-17 22:32:47 +01:00
saberzero1 02488d07b2 fix: suppress harmless esbuild warnings from bundled plugin deps
Add logOverride to the main esbuild build context to silence three
warning types that originate from upstream third-party code bundled
inside plugin dist files:
- direct-eval: gray-matter's JS frontmatter engine in note-properties
- equals-negative-zero: webidl-conversions in citations
- duplicate-object-key: BibTeX month mapping in citations
2026-03-17 21:26:44 +01:00
saberzero1 d792d8ebf9 feat: add runtime plugin externals validation and native dep install
- validatePluginExternals() scans plugin dist/ for unbundled imports
  and warns when non-allowlisted externals are detected
- installPluginDepsIfNeeded() runs npm install for plugins with
  quartz.requiresInstall flag (for native deps like sharp)
- Added requiresInstall field to PluginManifest type
2026-03-17 19:46:42 +01:00
steven-smith-IT 56a801345a fix(cli): use 'gray' instead of 'grey' in styleText calls (#2340) 2026-03-17 15:23:32 +01:00