diff --git a/docs/guide/data-loading.md b/docs/guide/data-loading.md index c7f7c8e69696..a2d1405c360a 100644 --- a/docs/guide/data-loading.md +++ b/docs/guide/data-loading.md @@ -193,3 +193,13 @@ export default defineLoader({ } }) ``` + +## Configuration + +To get the configuration information inside a loader, you can use some code like this: + +```ts +import type { SiteConfig } from 'vitepress' + +const config: SiteConfig = (globalThis as any).VITEPRESS_CONFIG +```