|
| 1 | +// @ts-check |
| 2 | +import { defineConfig } from 'astro/config'; |
| 3 | +import starlight from '@astrojs/starlight'; |
| 4 | +import { fileURLToPath } from 'node:url'; |
| 5 | +import { ion } from 'starlight-ion-theme'; |
| 6 | +import starlightGiscus from 'starlight-giscus'; |
| 7 | +import starlightScrollToTop from 'starlight-scroll-to-top'; |
| 8 | +import starlightLinksValidator from 'starlight-links-validator' |
| 9 | +import mermaid from 'astro-mermaid'; |
| 10 | + |
| 11 | +// https://astro.build/config |
| 12 | +export default defineConfig({ |
| 13 | + integrations: [ |
| 14 | + mermaid({ |
| 15 | + theme: 'forest', |
| 16 | + autoTheme: true, |
| 17 | + iconPacks: [ |
| 18 | + { |
| 19 | + name: 'logos', |
| 20 | + loader: () => fetch('https://unpkg.com/@iconify-json/logos@1/icons.json').then(res => res.json()) |
| 21 | + }, |
| 22 | + { |
| 23 | + name: 'lobe', |
| 24 | + loader: () => fetch('https://unpkg.com/@proj-airi/lobe-icons@latest/icons.json').then((res) => res.json()), |
| 25 | + }, |
| 26 | + ] |
| 27 | + }), |
| 28 | + starlight({ |
| 29 | + title: 'OpenGateLLM', |
| 30 | + editLink: { |
| 31 | + baseUrl: 'https://github.com/etalab-ia/OpenGateLLM/edit/main/docs', |
| 32 | + }, |
| 33 | + components: { |
| 34 | + Pagination: './src/components/Pagination.astro', |
| 35 | + }, |
| 36 | + logo: { |
| 37 | + src: './src/assets/logo.svg', |
| 38 | + }, |
| 39 | + social: [ |
| 40 | + { |
| 41 | + icon: 'github', |
| 42 | + label: 'GitHub', |
| 43 | + href: 'https://github.com/etalab-ia/OpenGateLLM' |
| 44 | + } |
| 45 | + ], |
| 46 | + plugins: [ |
| 47 | + ion({ |
| 48 | + icons: { |
| 49 | + iconDir: fileURLToPath(new URL('./src/assets/icons', import.meta.url)), |
| 50 | + include: { lucide: ['*'], lobe: ['*'] }, |
| 51 | + }, |
| 52 | + }), |
| 53 | + starlightGiscus({ |
| 54 | + repo: 'etalab-ia/OpenGateLLM', |
| 55 | + repoId: 'R_kgDOMT6C-w', |
| 56 | + category: 'General', |
| 57 | + categoryId: 'DIC_kwDOMT6C-84CkkTP' |
| 58 | + }), |
| 59 | + starlightScrollToTop(), |
| 60 | + starlightLinksValidator(), |
| 61 | + ], |
| 62 | + sidebar: [ |
| 63 | + { |
| 64 | + label: 'Overview', |
| 65 | + autogenerate: { |
| 66 | + directory: 'overview', |
| 67 | + }, |
| 68 | + }, |
| 69 | + { |
| 70 | + label: '[lucide:mountain]Roadmap', |
| 71 | + link: 'https://github.com/etalab-ia/OpenGateLLM/milestone/4', |
| 72 | + attrs: { target: '_blank', style: 'font-size: 0.875rem;' }, |
| 73 | + }, |
| 74 | + { |
| 75 | + label: '[lucide:book-open] API reference', |
| 76 | + link: '/reference/', |
| 77 | + attrs: { target: '_blank', style: 'font-size: 0.875rem;' }, |
| 78 | + }, { |
| 79 | + label: '[lucide:rocket] Release notes', |
| 80 | + link: 'https://github.com/etalab-ia/OpenGateLLM/releases', |
| 81 | + badge: 'v0.4.0post1', |
| 82 | + attrs: { target: '_blank', style: 'font-size: 0.875rem;' }, |
| 83 | + }, |
| 84 | + { |
| 85 | + label: 'Getting started', |
| 86 | + autogenerate: { |
| 87 | + directory: 'getting-started', |
| 88 | + }, |
| 89 | + }, |
| 90 | + { |
| 91 | + label: 'Advanced configuration', |
| 92 | + autogenerate: { |
| 93 | + directory: 'configuration', |
| 94 | + }, |
| 95 | + }, |
| 96 | + { |
| 97 | + label: 'Deployment', |
| 98 | + autogenerate: { |
| 99 | + directory: 'deployment', |
| 100 | + }, |
| 101 | + }, |
| 102 | + { |
| 103 | + label: 'Features', |
| 104 | + autogenerate: { |
| 105 | + directory: 'features', |
| 106 | + }, |
| 107 | + }, |
| 108 | + { |
| 109 | + label: 'Contributing', |
| 110 | + items: [ |
| 111 | + { label: '[lucide:book-open] Contributing guide', autogenerate: { directory: 'contributing' } }, |
| 112 | + ], |
| 113 | + }, |
| 114 | + ], |
| 115 | + }), |
| 116 | + ], |
| 117 | +}); |
0 commit comments