fix(v2): sidebar autogen from subfolder should read category metadata correctly (#4651)

* fix sidebar autogen bug

* fix sidebar autogen bug
This commit is contained in:
Sébastien Lorber 2021-04-20 18:16:51 +02:00 committed by GitHub
parent 03536a0682
commit d0d29f43cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 162 additions and 0 deletions

View file

@ -186,6 +186,7 @@ export const DefaultSidebarItemsGenerator: SidebarItemsGenerator = async functio
}): Promise<SidebarItemCategory & WithPosition> {
const categoryDirPath = path.join(
version.contentPath,
item.dirName, // fix https://github.com/facebook/docusaurus/issues/4638
breadcrumb.join(BreadcrumbSeparator),
);