Quartz OMP Plugin Patching Workflow
When working with the quartz-omp ecosystem, standard Quartz 5 plugin conventions (like quartz.config.ts) do not apply. The system relies on a modular, YAML-driven plugin architecture.
1. Configuration
Always modify plugin configurations via quartz.config.yaml (or quartz.config.default.yaml), never quartz.config.ts.
2. Patching External Plugins
If an external github: plugin needs modification (e.g., github:quartz-community/article-title), it must be vendored into the local workspace:
- Copy the cached plugin: The
install-pluginsscript caches github plugins in.quartz/plugins/. Copy the target plugin from.quartz/plugins/<plugin-name>toquartz/local-plugins/<plugin-name>. - Update the config: Change its entry in
quartz.config.yamlfromsource: github:quartz-community/<plugin-name>tosource: ./quartz/local-plugins/<plugin-name>.
3. Building Local Plugins
Every plugin inside quartz/local-plugins/ acts as an isolated NPM package.
After making edits to a local plugin's source files, you MUST:
cd quartz/local-plugins/<plugin-name>
npm install
npm run build
4. Cross-Plugin Imports (TypeScript rootDir Errors)
If you attempt to import a utility from outside the plugin's directory (e.g., import { util } from "../../../../util/helper.ts"), tsup/tsc will fail to generate .d.ts types because the import is outside the compiler's rootDir.
To fix this, edit the plugin's tsconfig.json and remove the "rootDir": "." property before building.