Conversation
Prepares the multi-draft quick-compile feature for release. Tag 2.2.0-beta.5 should be pushed after this merges to main to trigger release.yml (manifest version must match the tag). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extract the output-path placeholder substitution into an obsidian-free write-to-note-utils module (matching the existing *-utils test pattern) and add unit tests for draftOutputName and applyTargetPlaceholders: $2 → draft name (draftTitle, falling back to the index basename), $1 → project title, global replacement, and distinct names across the drafts of a project. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Shared resource files (metadata.json for Add Zenodo Frontmatter, JSON
data for Replace JSON Placeholders) were only looked up in the index
note's own folder. Drafts whose index lives in a per-draft subfolder
could not see a metadata.json placed at the project root, causing
"metadata file not found" errors when compiling such drafts.
Introduce a project root = lowest common ancestor of a project's draft
folders, and search for shared resources from the draft's folder up to
that root (inclusive), checking both <dir>/<file> and <dir>/source/<file>.
The search is bounded at the project root, so it never picks up an
unrelated file higher in the vault. Single-draft and same-folder
projects are unaffected (root == index folder => one level only).
Supports project layouts like:
project/
metadata.json
draft A/A index.md
draft B/B index.md
- New obsidian-free, unit-tested util src/model/project-resources.ts
(projectRootPath, projectResourceCandidatePaths, LCA helpers).
- Thread projectRoot through CompileContext and compile() options; pass
it from CompileView (single + Compile All) and both compile commands.
- The metadata editor now loads/saves the shared file at the project root.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ships shared-metadata resolution up to the project root. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
将 dev 上自 2.2.0-beta.4 以来的改动合入 main。
包含
01d11c3)metadata.json/ JSON 数据文件从 draft 文件夹向上找到项目根为止(含source/),支持每个 draft 放在各自子目录、共享根目录一份 metadata 的结构。src/model/project-resources.ts+ 17 个单测。$1/$2文件名占位符(c86b940)验证
npm run test:unit:53 passednpm run build:svelte-check 0 errors,构建成功🤖 Generated with Claude Code