mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
refactor(content-docs): read category metadata files before autogenerating (#6586)
* refactor(content-docs): read category metadata files before autogenerating * fix tests * fix Windows... * warn user when behavior is undetermined * oops * fix typo
This commit is contained in:
parent
b03431f139
commit
1ca07f8466
9 changed files with 120 additions and 128 deletions
|
@ -94,6 +94,7 @@ type SidebarGenerator = (generatorArgs: {
|
|||
sidebarPosition?: number | undefined;
|
||||
}>; // all the docs of that version (unfiltered)
|
||||
numberPrefixParser: PrefixParser; // numberPrefixParser configured for this plugin
|
||||
categoriesMetadata: Record<string, CategoryMetadata>; // key is the path relative to the doc directory, value is the category metadata file's content
|
||||
isCategoryIndex: CategoryIndexMatcher; // the default category index matcher, that you can override
|
||||
defaultSidebarItemsGenerator: SidebarGenerator; // useful to re-use/enhance default sidebar generation logic from Docusaurus
|
||||
}) => Promise<SidebarItem[]>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue