chore: 同步 Quartz v5 并升级到 Node 26 - #40
Open
oldwinter wants to merge 58 commits into
Open
Conversation
The serve-mode watcher globs never matched quartz.config.yaml or quartz.config.default.yaml, so config edits (theme colors, plugin flags, footer links) silently required a server restart. This was a regression from v4, where quartz.config.ts matched the **/*.ts glob.
Co-authored-by: Leo Schultheiß <leo.schultheiss@fau.de>
… updates (jackyzha0#2426) Bumps the ci-dependencies group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6` | `7` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `7` | `8` | | [rlespinasse/github-slug-action](https://github.com/rlespinasse/github-slug-action) | `5.4.0` | `5.6.0` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` | | [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.0.0` | `4.1.2` | | [docker/login-action](https://github.com/docker/login-action) | `3` | `4` | | [docker/metadata-action](https://github.com/docker/metadata-action) | `5` | `6` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` | Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v6...v7) Updates `actions/download-artifact` from 7 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v7...v8) Updates `rlespinasse/github-slug-action` from 5.4.0 to 5.6.0 - [Release notes](https://github.com/rlespinasse/github-slug-action/releases) - [Commits](rlespinasse/github-slug-action@v5.4.0...v5.6.0) Updates `docker/setup-qemu-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@v3...v4) Updates `docker/setup-buildx-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v3...v4) Updates `sigstore/cosign-installer` from 4.0.0 to 4.1.2 - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](sigstore/cosign-installer@v4.0.0...v4.1.2) Updates `docker/login-action` from 3 to 4 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v3...v4) Updates `docker/metadata-action` from 5 to 6 - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@v5...v6) Updates `docker/build-push-action` from 6 to 7 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: docker/login-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: docker/metadata-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: docker/setup-buildx-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: docker/setup-qemu-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: ci-dependencies - dependency-name: rlespinasse/github-slug-action dependency-version: 5.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies - dependency-name: sigstore/cosign-installer dependency-version: 4.1.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Plugins can now be referenced as "@quartz-community/<name>" in quartz.config.yaml and via 'quartz plugin add'. The npm path skips git installation and resolves from node_modules. Changes: - gitLoader.ts: detect @scope/name as npm package in parsePluginSource() - config-loader.ts: skip git install for npm packages, read manifests from node_modules via createRequire - install-plugins.ts: filter npm packages from prebuild, fallback to YAML config parsing to avoid loading full quartz.ts - plugin-data.js: npm detection in CLI parseGitSource() - plugin-git-handlers.js: npm install path in handlePluginAdd() - package.json: add missing hast-util-from-html dependency
- quartz.config.default.yaml: all 44 plugins use @quartz-community/* npm specifiers - cli/templates/*.yaml: all 4 templates updated (default, blog, obsidian, ttrpg) - bootstrap-cli.mjs: updated help text - package.json: devDeps use npm semver ranges instead of github: specifiers - gitLoader.ts: regeneratePluginIndex scans npm packages from node_modules - install-plugins.ts: generates plugin index for npm packages - Removed quartz.lock.json (only relevant for git-installed plugins)
With npm specifiers, quartz.lock.json may not exist. The glob pattern makes the COPY conditional.
- Added all 44 default plugins as dependencies so npm ci installs them - Fixed @quartz-community/fonts → @quartz-community/quartz-fonts (actual npm name) - Regenerated package-lock.json with plugin dependencies
og-image requires sharp as a peer dep which conflicts with the version installed by quartz core. legacy-peer-deps allows both to coexist until the peer dep ranges are aligned.
The lockfile was generated on linux x86_64 but CI needs platform- specific optional deps for all architectures. npm install resolves them correctly while npm ci requires exact lockfile match.
The npm specifier path requires additional work in the esbuild transpilation pipeline to mark npm imports as external. Reverting to github: specifiers to restore the docs site immediately. The npm loader code (parsePluginSource, config-loader, CLI) remains in place for future use. Only the default config/templates are reverted.
- Default config and all 4 templates use @quartz-community/* npm specifiers - config-loader: npm packages imported directly (not via .quartz/plugins/ paths) - gitLoader: regeneratePluginIndex cross-references .d.ts with .js to correctly classify type-only exports, preventing runtime 'does not provide export' errors - All 44 default plugins added as dependencies - Locally tested: 111 docs files → 374 output files, zero errors
…er ranges) Multiple plugins declare incompatible peer dep ranges for shared packages (sharp, @myriaddreamin/rehype-typst, etc). These are optional peers that work correctly at runtime. legacy-peer-deps is the appropriate setting for a host application consuming many plugins.
Remove unconditional import of CustomOgImagesEmitterName from .quartz/plugins in Head.tsx. This caused builds to fail when the og-image plugin was not listed in quartz.config.yaml, violating the plugin system's opt-in contract. The fix inlines the emitter name string constant at the usage site. Also convert the ContentDetails import in fileTrie.ts to `import type` since it is only used in a type position.
Add @quartz-themes/core to dependencies and @quartz-themes/ to shared scopes so theme packages are treated as externals by the plugin bundler.
Add disabled theme entry to default config and default/blog templates. Migrate obsidian and ttrpg templates from git-based quartz-themes source to npm @quartz-themes/core package.
…e positions, footer as array, add defaultPosition fallback, add tests, update docs
…ader and gitLoader
…ad of generated .quartz/plugins
…20260831 # Conflicts: # quartz/plugins/loader/install-plugins.ts
❌ Deploy Preview for aquamarine-salamander-b041fe failed. Why did it fail? →
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
构建了什么
jackyzha0/quartz的v5到075afd3f712da0088a07f5284a7b3aba37dd61b6,保留本地主题切换器、中文内容和 vendored Obsidian Flavored Markdown 插件。@quartz-community/*包;本地 OFM/theme 插件继续使用仓库内路径。为什么觉得它会很酷/值得合并
官方迁移来源
验证
npm ci、npm outdated0 项、npm audit0 漏洞、install scripts 0 pending。tsc --noEmit通过。.quartz目录安装结果为 2 个本地插件 + 35 个 npm 插件,无重复导出警告。git diff --check通过;完整 Docker build 通过,镜像 SHA8d2be5459e721daaf7cf84c03d79ff9f28a3ef82d77aebd52a631c0037482f10。影响
npm ci。回滚
cd7eeaf726a77890f20bc1293bb68e0be393d7ee。d8fa4d9794d739b1ffec8ad6c9bc705c6b59ac55。阻塞项
残余风险:本 PR 不自动合并;兼容上限、外部 CI/运行环境限制及未覆盖场景以本节和“影响”中的记录为准。
仓库全量
npm run check的类型阶段通过,但 Prettier 会命中既有的 259 个内容、Canvas 和文档格式差异;本 PR 未批量改写知识库,只对本次源文件做了定向格式验证。内容构建保留两个非致命既有警告:
foam.md的非标准日期,以及 LXGW WenKai 400 weight 的 Google Fonts HTTP 400;构建仍完整产出 1912 个文件。Netlify 为 exact SHA
cd7eeaf7创建的 deploy preview 在 10 秒内进入state=error,published_at/deploy_time/error_message均为空且预览 URL 返回 404;其 build log 需要 Netlify 登录,当前环境无法取得更具体原因。对应 4 个 Netlify 状态均失败。上游 GitHub Actions workflow 保留
github.repository == 'jackyzha0/quartz'保护条件,因此 fork PR 没有标准 CI checks;本 PR 没有修改 runner、billing、Netlify 配置、secrets 或部署权限。未执行浏览器视觉回归或跨架构 Docker build;当前证据为 macOS arm64 本地构建、测试、内容生成与 arm64 Docker build。