@@ -22,6 +22,15 @@ function getTypedocSidebar() {
2222}
2323
2424const typedocSidebar = getTypedocSidebar ( )
25+ const rolldownSidebar : { items : DefaultTheme . SidebarItem [ ] ; base : string } = {
26+ items : typedocSidebar [ 0 ]
27+ . items ! [ 0 ] . items ! . filter (
28+ ( item ) => item . text === 'Interfaces' || item . text === 'Type Aliases' ,
29+ ) !
30+ . flatMap ( ( item ) => item . items ! )
31+ . toSorted ( ( a , b ) => a . text ! . localeCompare ( b . text ! ) ) ,
32+ base : '/reference' ,
33+ }
2534
2635export function getLocaleConfig ( lang : string ) {
2736 const t = createTranslate ( lang )
@@ -131,9 +140,13 @@ export function getLocaleConfig(lang: string) {
131140 } ,
132141 {
133142 text : t ( 'Type Definitions' ) ,
134- items : typedocSidebar
135- . flatMap ( ( i ) => i . items ! )
136- . filter ( ( i ) => i . text !== 'Options' ) ,
143+ items : [
144+ { text : 'Rolldown' , link : '/api/rolldown.md' } ,
145+ ...typedocSidebar
146+ . flatMap ( ( i ) => i . items ! )
147+ . filter ( ( i ) => i . text !== 'Options' && i . text !== 'rolldown' )
148+ . toSorted ( ( a , b ) => a . text ! . localeCompare ( b . text ! ) ) ,
149+ ] ,
137150 collapsed : true ,
138151 } ,
139152 ] ,
@@ -143,7 +156,10 @@ export function getLocaleConfig(lang: string) {
143156 const themeConfig : DefaultTheme . Config = {
144157 logo : { src : '/tsdown.svg' , width : 24 , height : 24 } ,
145158 nav,
146- sidebar,
159+ sidebar : {
160+ '/reference/api/rolldown' : rolldownSidebar ,
161+ '/' : sidebar ,
162+ } ,
147163 outline : 'deep' ,
148164 socialLinks : [
149165 { icon : 'github' , link : 'https://github.com/rolldown/tsdown' } ,
0 commit comments