watchContentConfig() — astro Function Reference
Architecture documentation for the watchContentConfig() function in content-layer.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 963f8134_57bf_4ccb_ae76_1a8cd242c521["watchContentConfig()"] 4a6efe25_e6e4_25af_3955_aede0d8f5983["ContentLayer"] 963f8134_57bf_4ccb_ae76_1a8cd242c521 -->|defined in| 4a6efe25_e6e4_25af_3955_aede0d8f5983 fa13ca14_45c4_dd38_e5f1_14d76ddb3944["sync()"] 963f8134_57bf_4ccb_ae76_1a8cd242c521 -->|calls| fa13ca14_45c4_dd38_e5f1_14d76ddb3944 style 963f8134_57bf_4ccb_ae76_1a8cd242c521 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/content-layer.ts lines 83–90
watchContentConfig() {
this.#unsubscribe?.();
this.#unsubscribe = globalContentConfigObserver.subscribe(async (ctx) => {
if (ctx.status === 'loaded' && ctx.config.digest !== this.#lastConfigDigest) {
this.sync();
}
});
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does watchContentConfig() do?
watchContentConfig() is a function in the astro codebase, defined in packages/astro/src/content/content-layer.ts.
Where is watchContentConfig() defined?
watchContentConfig() is defined in packages/astro/src/content/content-layer.ts at line 83.
What does watchContentConfig() call?
watchContentConfig() calls 1 function(s): sync.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free