mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 03:02:30 +02:00
refactor: fix a few places of path handling (#7023)
This commit is contained in:
parent
e6838dd7a6
commit
4957ec947b
7 changed files with 9 additions and 15 deletions
|
@ -14,7 +14,7 @@ import type {
|
|||
SidebarItemCategoryLinkConfig,
|
||||
} from './types';
|
||||
import _ from 'lodash';
|
||||
import {addTrailingSlash, posixPath} from '@docusaurus/utils';
|
||||
import {addTrailingSlash} from '@docusaurus/utils';
|
||||
import logger from '@docusaurus/logger';
|
||||
import path from 'path';
|
||||
import {createDocsByIdIndex, toCategoryIndexMatcherParam} from '../docs';
|
||||
|
@ -157,7 +157,7 @@ Available doc IDs:
|
|||
folderName: string,
|
||||
): WithPosition<NormalizedSidebarItemCategory> {
|
||||
const categoryMetadata =
|
||||
categoriesMetadata[posixPath(path.join(autogenDir, fullPath))];
|
||||
categoriesMetadata[path.posix.join(autogenDir, fullPath)];
|
||||
const allItems = Object.entries(dir).map(([key, content]) =>
|
||||
dirToItem(content, key, `${fullPath}/${key}`),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue