mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-25 12:38:57 +02:00
chore(plugin-docs): remove legacy versioned prefix on doc ids and sidebar names in versioned sidebars (#9310)
This commit is contained in:
parent
f5ae537d3e
commit
598b32011f
25 changed files with 264 additions and 396 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
import _ from 'lodash';
|
||||
import {normalizeUrl} from '@docusaurus/utils';
|
||||
import {getDocIds} from '../docs';
|
||||
import type {
|
||||
SidebarItem,
|
||||
Sidebars,
|
||||
|
@ -102,7 +101,7 @@ export function postProcessSidebars(
|
|||
sidebars: ProcessedSidebars,
|
||||
params: SidebarProcessorParams,
|
||||
): Sidebars {
|
||||
const draftIds = new Set(params.drafts.flatMap(getDocIds));
|
||||
const draftIds = new Set(params.drafts.map((d) => d.id));
|
||||
|
||||
return _.mapValues(sidebars, (sidebar) =>
|
||||
sidebar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue