|
| 1 | +export interface SidebarItem { |
| 2 | + title: string |
| 3 | + href: string |
| 4 | + icon?: string |
| 5 | + isNew?: boolean |
| 6 | +} |
| 7 | + |
| 8 | +export interface SidebarSection { |
| 9 | + title: string |
| 10 | + icon: string |
| 11 | + isNew?: boolean |
| 12 | + items: SidebarItem[] |
| 13 | +} |
| 14 | + |
| 15 | +export function useSidebarConfig() { |
| 16 | + const sections: SidebarSection[] = [ |
| 17 | + { |
| 18 | + title: 'Getting Started', |
| 19 | + icon: 'i-solar-play-circle-bold', |
| 20 | + items: [ |
| 21 | + { title: 'Quickstart', href: '/getting-started/quickstart', icon: 'i-solar-play-bold' }, |
| 22 | + { title: 'Installation', href: '/getting-started/installation', icon: 'i-solar-download-square-bold' }, |
| 23 | + { title: 'Configuration', href: '/getting-started/configuration', icon: 'i-solar-settings-bold' }, |
| 24 | + { title: 'Client Setup', href: '/getting-started/client-setup', icon: 'i-solar-monitor-bold' }, |
| 25 | + { title: 'Type Augmentation', href: '/getting-started/type-augmentation', icon: 'i-solar-code-file-bold' }, |
| 26 | + { title: 'Schema Generation', href: '/getting-started/schema-generation', icon: 'i-solar-database-bold' }, |
| 27 | + ], |
| 28 | + }, |
| 29 | + { |
| 30 | + title: 'Core Concepts', |
| 31 | + icon: 'i-solar-book-bookmark-bold', |
| 32 | + items: [ |
| 33 | + { title: 'How It Works', href: '/core-concepts/how-it-works', icon: 'i-solar-lightbulb-bolt-bold' }, |
| 34 | + { title: 'Server Auth', href: '/core-concepts/server-auth', icon: 'i-solar-server-bold' }, |
| 35 | + { title: 'Sessions', href: '/core-concepts/sessions', icon: 'i-solar-key-bold' }, |
| 36 | + { title: 'Route Protection', href: '/core-concepts/route-protection', icon: 'i-solar-shield-check-bold' }, |
| 37 | + { title: 'Auto Imports & Aliases', href: '/core-concepts/auto-imports-aliases', icon: 'i-solar-box-bold' }, |
| 38 | + { title: 'Security Caveats', href: '/core-concepts/security-caveats', icon: 'i-solar-danger-triangle-bold' }, |
| 39 | + ], |
| 40 | + }, |
| 41 | + { |
| 42 | + title: 'Guides', |
| 43 | + icon: 'i-solar-map-bold', |
| 44 | + items: [ |
| 45 | + { title: 'Role-Based Access', href: '/guides/role-based-access', icon: 'i-solar-users-group-rounded-bold' }, |
| 46 | + { title: 'API Protection', href: '/guides/api-protection', icon: 'i-solar-lock-bold' }, |
| 47 | + { title: 'Custom Dialects', href: '/guides/custom-dialects', icon: 'i-solar-database-bold' }, |
| 48 | + ], |
| 49 | + }, |
| 50 | + { |
| 51 | + title: 'API', |
| 52 | + icon: 'i-solar-code-square-bold', |
| 53 | + items: [ |
| 54 | + { title: 'Server', href: '/api/server', icon: 'i-solar-server-square-bold' }, |
| 55 | + { title: 'Client', href: '/api/client', icon: 'i-solar-monitor-smartphone-bold' }, |
| 56 | + ], |
| 57 | + }, |
| 58 | + { |
| 59 | + title: 'Troubleshooting', |
| 60 | + icon: 'i-solar-bug-bold', |
| 61 | + items: [ |
| 62 | + { title: 'Common Issues', href: '/troubleshooting/common-issues', icon: 'i-solar-question-circle-bold' }, |
| 63 | + ], |
| 64 | + }, |
| 65 | + { |
| 66 | + title: 'Better Auth', |
| 67 | + icon: 'i-solar-link-round-angle-bold', |
| 68 | + items: [ |
| 69 | + { title: 'Documentation', href: 'https://www.better-auth.com/docs', icon: 'i-solar-book-2-bold' }, |
| 70 | + ], |
| 71 | + }, |
| 72 | + ] |
| 73 | + |
| 74 | + return { sections } |
| 75 | +} |
0 commit comments