chore(plugin-docs): remove legacy versioned prefix on doc ids and sidebar names in versioned sidebars (#9310)

This commit is contained in:
Sébastien Lorber 2023-09-15 18:52:42 +02:00 committed by GitHub
parent f5ae537d3e
commit 598b32011f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 264 additions and 396 deletions

View file

@ -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