|
|
@ -85,6 +85,12 @@ export interface UserConfig<ThemeConfig = any> {
|
|
|
|
* @default 'disabled'
|
|
|
|
* @default 'disabled'
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
cleanUrls?: CleanUrlsMode
|
|
|
|
cleanUrls?: CleanUrlsMode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Build end hook: called when SSG finish.
|
|
|
|
|
|
|
|
* @param siteConfig The resolved configuration.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
buildEnd?: (siteConfig: SiteConfig) => Promise<void>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export type RawConfigExports<ThemeConfig = any> =
|
|
|
|
export type RawConfigExports<ThemeConfig = any> =
|
|
|
@ -103,6 +109,7 @@ export interface SiteConfig<ThemeConfig = any>
|
|
|
|
| 'lastUpdated'
|
|
|
|
| 'lastUpdated'
|
|
|
|
| 'ignoreDeadLinks'
|
|
|
|
| 'ignoreDeadLinks'
|
|
|
|
| 'cleanUrls'
|
|
|
|
| 'cleanUrls'
|
|
|
|
|
|
|
|
| 'buildEnd'
|
|
|
|
> {
|
|
|
|
> {
|
|
|
|
root: string
|
|
|
|
root: string
|
|
|
|
srcDir: string
|
|
|
|
srcDir: string
|
|
|
@ -182,7 +189,8 @@ export async function resolveConfig(
|
|
|
|
shouldPreload: userConfig.shouldPreload,
|
|
|
|
shouldPreload: userConfig.shouldPreload,
|
|
|
|
mpa: !!userConfig.mpa,
|
|
|
|
mpa: !!userConfig.mpa,
|
|
|
|
ignoreDeadLinks: userConfig.ignoreDeadLinks,
|
|
|
|
ignoreDeadLinks: userConfig.ignoreDeadLinks,
|
|
|
|
cleanUrls: userConfig.cleanUrls || 'disabled'
|
|
|
|
cleanUrls: userConfig.cleanUrls || 'disabled',
|
|
|
|
|
|
|
|
buildEnd: userConfig.buildEnd
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return config
|
|
|
|
return config
|
|
|
|