refactor(content-docs): split version handling into several files (#7140)

* refactor(content-docs): split version handling into several files

* fix test

* increase timeout
This commit is contained in:
Joshua Chen 2022-04-09 17:08:57 +08:00 committed by GitHub
parent 7d44961d8b
commit 96fbcb3f51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 618 additions and 698 deletions

View file

@ -32,7 +32,6 @@ export const DefaultSidebars: SidebarsConfig = {
export const DisabledSidebars: SidebarsConfig = {};
// If a path is provided, make it absolute
// use this before loadSidebars()
export function resolveSidebarPathOption(
siteDir: string,
sidebarPathOption: PluginOptions['sidebarPath'],
@ -93,7 +92,6 @@ export async function loadSidebarsFileUnsafe(
return importFresh(sidebarFilePath);
}
// Note: sidebarFilePath must be absolute, use resolveSidebarPathOption
export async function loadSidebars(
sidebarFilePath: string | false | undefined,
options: SidebarProcessorParams,