Skip to content

Commit

Permalink
fix(docs): fix docs sidebar (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
yansongda authored Sep 10, 2023
1 parent 6318a1e commit 7c102c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions web/.vitepress/config/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import versions from '../sidebar/versions'
// @ts-nocheck
import { DefaultTheme } from 'vitepress'

let sidebars: DefaultTheme.Sidebar = {}

versions.forEach(async (version) => {
const path = `/docs/${version}/`

// @ts-ignore
sidebars[path] = (await import('../sidebar/v3')).default as DefaultTheme.Sidebar
});
let sidebars: DefaultTheme.Sidebar = {
'/docs/v1': (await import('../sidebar/v1')).default as DefaultTheme.Sidebar,
'/docs/v2': (await import('../sidebar/v2')).default as DefaultTheme.Sidebar,
'/docs/v3': (await import('../sidebar/v3')).default as DefaultTheme.Sidebar,
}

export default sidebars
1 change: 0 additions & 1 deletion web/.vitepress/sidebar/versions.ts

This file was deleted.

0 comments on commit 7c102c7

Please sign in to comment.