fix: move ExternalPlugin overrides before loadQuartzConfig in quartz.ts docs

loadQuartzConfig() internally calls loadQuartzLayout() to build the
PageTypeDispatcher, which instantiates components. Plugin option overrides
must be registered before this happens. Updated quartz.ts and all doc
snippets that show the ExternalPlugin override pattern to place calls
before loadQuartzConfig(). Also updated OxHugo and Roam docs from stale
v4 plugins pattern to v5 override pattern.
This commit is contained in:
saberzero1
2026-05-24 18:32:05 +02:00
parent d45b7a7bf6
commit ed0f27c05f
8 changed files with 22 additions and 23 deletions

View File

@@ -242,6 +242,7 @@ plugins:
> Some plugin options require JavaScript callback functions (e.g. custom sort, filter, or map functions) that can't be expressed in YAML. For these, use the TS override in `quartz.ts`:
>
> ```ts title="quartz.ts"
> import { loadQuartzConfig, loadQuartzLayout } from "./quartz/plugins/loader/config-loader"
> import * as ExternalPlugin from "./.quartz/plugins"
>
> ExternalPlugin.Explorer({
@@ -250,9 +251,13 @@ plugins:
> return node
> },
> })
>
> const config = await loadQuartzConfig()
> export default config
> export const layout = await loadQuartzLayout()
> ```
>
> Options set in `quartz.ts` are merged with YAML options and take precedence. See the plugin-specific documentation for available callback options.
> Options set in `quartz.ts` are merged with YAML options and take precedence. Plugin overrides must be placed **before** `loadQuartzConfig()` so they are applied when components are instantiated during config loading. See the plugin-specific documentation for available callback options.
You can see a list of all plugins and their configuration options [[tags/plugin|here]].