diff --git a/src/node/siteConfig.ts b/src/node/siteConfig.ts index 99751d5e..e27bbce1 100644 --- a/src/node/siteConfig.ts +++ b/src/node/siteConfig.ts @@ -23,9 +23,9 @@ export type RawConfigExports = | Awaitable> | (() => Awaitable>) -export interface TransformContext { +export interface TransformContext { page: string - siteConfig: SiteConfig + siteConfig: SiteConfig siteData: SiteData pageData: PageData title: string @@ -35,8 +35,8 @@ export interface TransformContext { assets: string[] } -export interface TransformPageContext { - siteConfig: SiteConfig +export interface TransformPageContext { + siteConfig: SiteConfig } export interface UserConfig @@ -161,7 +161,7 @@ export interface UserConfig * Build end hook: called when SSG finish. * @param siteConfig The resolved configuration. */ - buildEnd?: (siteConfig: SiteConfig) => Awaitable + buildEnd?: (siteConfig: SiteConfig) => Awaitable /** * Render end hook: called when SSR rendering is done. @@ -173,7 +173,9 @@ export interface UserConfig * * This build hook will allow you to modify the head adding new entries that cannot be statically added. */ - transformHead?: (context: TransformContext) => Awaitable + transformHead?: ( + ctx: TransformContext + ) => Awaitable /** * HTML transform hook: runs before writing HTML to dist. @@ -181,7 +183,7 @@ export interface UserConfig transformHtml?: ( code: string, id: string, - ctx: TransformContext + ctx: TransformContext ) => Awaitable /** @@ -189,7 +191,7 @@ export interface UserConfig */ transformPageData?: ( pageData: PageData, - ctx: TransformPageContext + ctx: TransformPageContext ) => Awaitable | { [key: string]: any } | void> /** @@ -207,7 +209,7 @@ export interface UserConfig export interface SiteConfig extends Pick< - UserConfig, + UserConfig, | 'markdown' | 'vue' | 'vite' @@ -243,6 +245,6 @@ export interface SiteConfig inv: Record } logger: Logger - userConfig: UserConfig + userConfig: UserConfig buildConcurrency: number }