| 1 | // @ts-check |
| 2 | import starlight from '@astrojs/starlight'; |
| 3 | import { defineConfig } from 'astro/config'; |
| 4 | |
| 5 | import { generateApiReference } from './scripts/api-reference.mjs'; |
| 6 | |
| 7 | // A page per REST operation, written from the OpenAPI document. |
| 8 | const apiGroups = generateApiReference(); |
| 9 | |
| 10 | export default defineConfig({ |
| 11 | site: 'https://docs.g1t.sh', |
| 12 | // Pages that moved, so links already shared still arrive. |
| 13 | redirects: { |
| 14 | '/guides/inbox/': '/guides/notifications/', |
| 15 | '/guides/mirroring/': '/guides/github/', |
| 16 | '/guides/today/': '/guides/home/', |
| 17 | // g1t no longer runs agents of its own: coding agents connect to it. |
| 18 | '/guides/g1t-agents/': '/guides/bring-your-own-agent/', |
| 19 | '/guides/working-with-g1t/': '/guides/bring-your-own-agent/', |
| 20 | '/guides/agents/': '/guides/bring-your-own-agent/', |
| 21 | '/guides/agent-abilities/': '/guides/bring-your-own-agent/', |
| 22 | '/guides/agent-access/': '/guides/bring-your-own-agent/', |
| 23 | '/guides/agent-memory/': '/guides/memory/', |
| 24 | '/guides/agent-routines/': '/guides/bring-your-own-agent/', |
| 25 | '/guides/agent-sessions/': '/guides/why-blame/', |
| 26 | '/guides/agent-skills/': '/guides/bring-your-own-agent/', |
| 27 | '/guides/agent-budgets/': '/guides/usage-and-billing/', |
| 28 | '/guides/agents-and-memory/': '/guides/memory/', |
| 29 | '/guides/talking-to-agents/': '/guides/bring-your-own-agent/', |
| 30 | '/guides/chat-app/': '/guides/chat/', |
| 31 | '/guides/customize/': '/guides/bring-your-own-agent/', |
| 32 | '/guides/marketplace/': '/guides/bring-your-own-agent/', |
| 33 | '/guides/models/': '/guides/integrations/', |
| 34 | '/guides/ai-gateway/': '/guides/integrations/', |
| 35 | '/guides/context-hub/': '/guides/memory/', |
| 36 | '/guides/spend/': '/guides/usage-and-billing/', |
| 37 | '/guides/outcomes/': '/guides/milestones/', |
| 38 | }, |
| 39 | integrations: [ |
| 40 | starlight({ |
| 41 | title: 'g1t docs', |
| 42 | description: 'Guides and reference for g1t, where a team and its coding agents talk, build and ship.', |
| 43 | components: { |
| 44 | Footer: './src/components/Footer.astro', |
| 45 | Head: './src/components/Head.astro', |
| 46 | Header: './src/components/Header.astro', |
| 47 | PageTitle: './src/components/PageTitle.astro', |
| 48 | SiteTitle: './src/components/SiteTitle.astro', |
| 49 | SocialIcons: './src/components/SocialIcons.astro', |
| 50 | }, |
| 51 | // Each tab under the header shows its own part of the sidebar. |
| 52 | routeMiddleware: './src/route-data.ts', |
| 53 | expressiveCode: { |
| 54 | // Dark first, as the base; the light one where the page is light. |
| 55 | // Starlight switches between them by <html data-theme>. |
| 56 | themes: ['github-dark-default', 'github-light-default'], |
| 57 | useDarkModeMediaQuery: false, |
| 58 | // Plain panels with a copy button, without window chrome. |
| 59 | defaultProps: { frame: 'none' }, |
| 60 | styleOverrides: { |
| 61 | borderRadius: '0.75rem', |
| 62 | borderColor: 'var(--g1t-line)', |
| 63 | codeBackground: 'var(--g1t-surface)', |
| 64 | codeFontSize: '0.8125rem', |
| 65 | frames: { |
| 66 | editorBackground: 'var(--g1t-surface)', |
| 67 | terminalBackground: 'var(--g1t-surface)', |
| 68 | terminalTitlebarBackground: 'var(--g1t-raised)', |
| 69 | terminalTitlebarBorderBottomColor: 'var(--g1t-line)', |
| 70 | editorTabBarBackground: 'var(--g1t-raised)', |
| 71 | shadowColor: 'transparent', |
| 72 | }, |
| 73 | }, |
| 74 | }, |
| 75 | logo: { src: '@g1t/theme/mark.svg', alt: '' }, |
| 76 | favicon: '/favicon.svg', |
| 77 | customCss: [ |
| 78 | '@g1t/theme/fonts.css', |
| 79 | '@g1t/theme/tokens.css', |
| 80 | './src/styles/light.css', |
| 81 | './src/styles/g1t.css', |
| 82 | ], |
| 83 | editLink: { |
| 84 | baseUrl: 'https://g1t.sh/flagon-io/g1t/blob/main/apps/docs/', |
| 85 | }, |
| 86 | lastUpdated: true, |
| 87 | head: [ |
| 88 | { tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '32x32' } }, |
| 89 | { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/icon-192.png' } }, |
| 90 | { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '512x512', href: '/icon-512.png' } }, |
| 91 | { tag: 'link', attrs: { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' } }, |
| 92 | { tag: 'link', attrs: { rel: 'manifest', href: '/site.webmanifest' } }, |
| 93 | // The browser's own bars, in the page's colour for the system's setting. |
| 94 | { tag: 'meta', attrs: { name: 'theme-color', content: '#0f0f11', media: '(prefers-color-scheme: dark)' } }, |
| 95 | { tag: 'meta', attrs: { name: 'theme-color', content: '#fbfbfa', media: '(prefers-color-scheme: light)' } }, |
| 96 | ], |
| 97 | sidebar: [ |
| 98 | { |
| 99 | label: 'Get started', |
| 100 | items: [ |
| 101 | { label: 'Quickstart', slug: 'quickstart' }, |
| 102 | { label: 'How g1t works', slug: 'concepts/overview' }, |
| 103 | { label: 'The g1t CLI', slug: 'guides/cli' }, |
| 104 | { label: 'Home', slug: 'guides/home' }, |
| 105 | { label: 'Ask g1t', slug: 'guides/ask' }, |
| 106 | { label: 'Notifications', slug: 'guides/notifications' }, |
| 107 | { label: 'The desktop app', slug: 'guides/desktop' }, |
| 108 | { label: 'The phone app', slug: 'guides/mobile' }, |
| 109 | { label: 'Search and Explore', slug: 'guides/search' }, |
| 110 | { label: 'Status and incidents', slug: 'guides/status' }, |
| 111 | ], |
| 112 | }, |
| 113 | { |
| 114 | label: 'Chat', |
| 115 | items: [ |
| 116 | { label: 'Chat', slug: 'guides/chat' }, |
| 117 | { label: 'Artifacts', slug: 'guides/artifacts' }, |
| 118 | ], |
| 119 | }, |
| 120 | { |
| 121 | label: 'Projects', |
| 122 | items: [ |
| 123 | { label: 'Projects', slug: 'guides/projects' }, |
| 124 | { label: 'Deployments', slug: 'guides/deployments' }, |
| 125 | { label: 'Deployments API', slug: 'guides/deployments-api' }, |
| 126 | { label: 'Observability', slug: 'guides/observability' }, |
| 127 | { label: 'Packages', slug: 'guides/packages' }, |
| 128 | { label: 'Container images', slug: 'guides/containers' }, |
| 129 | { label: 'npm', slug: 'guides/npm' }, |
| 130 | { label: 'Cargo', slug: 'guides/cargo' }, |
| 131 | { label: 'Composer', slug: 'guides/composer' }, |
| 132 | { label: 'Maven', slug: 'guides/maven' }, |
| 133 | { label: 'NuGet', slug: 'guides/nuget' }, |
| 134 | { label: 'RubyGems', slug: 'guides/rubygems' }, |
| 135 | { label: 'Go modules', slug: 'guides/go' }, |
| 136 | { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' }, |
| 137 | ], |
| 138 | }, |
| 139 | { |
| 140 | label: 'Security', |
| 141 | items: [ |
| 142 | { label: 'Security', slug: 'guides/security' }, |
| 143 | { label: 'Dependency updates', slug: 'guides/dependency-updates' }, |
| 144 | { label: 'Secret protection', slug: 'guides/security/secret-protection' }, |
| 145 | { label: 'Code scanning', slug: 'guides/security/code-scanning' }, |
| 146 | { label: 'Supply chain', slug: 'guides/security/supply-chain' }, |
| 147 | { label: 'Advisories and reporting', slug: 'guides/security/advisories' }, |
| 148 | { label: 'Security overview', slug: 'guides/security/security-overview' }, |
| 149 | { label: "What's free and what's paid", slug: 'guides/security/pricing' }, |
| 150 | ], |
| 151 | }, |
| 152 | { |
| 153 | label: 'Coding agents', |
| 154 | items: [ |
| 155 | { label: 'Connect a coding agent', slug: 'guides/bring-your-own-agent' }, |
| 156 | { label: 'Claude Code plugin', slug: 'guides/claude-code-plugin' }, |
| 157 | { label: 'Sessions, claims and dependencies', slug: 'guides/sessions' }, |
| 158 | { label: 'Sessions and why-blame', slug: 'guides/why-blame' }, |
| 159 | { label: 'Memory', slug: 'guides/memory' }, |
| 160 | ], |
| 161 | }, |
| 162 | { |
| 163 | label: 'Connect your tools', |
| 164 | items: [ |
| 165 | { label: 'Integrations', slug: 'guides/integrations' }, |
| 166 | { label: 'Webhooks', slug: 'guides/webhooks' }, |
| 167 | { label: 'GitHub Actions', slug: 'guides/actions' }, |
| 168 | { label: 'Self-hosted runners', slug: 'guides/self-hosted-runners' }, |
| 169 | { label: 'Guardrails', slug: 'guides/guardrails' }, |
| 170 | ], |
| 171 | }, |
| 172 | { |
| 173 | label: 'Landing changes', |
| 174 | items: [ |
| 175 | { label: 'Pull requests and checks', slug: 'guides/pull-requests' }, |
| 176 | { label: 'Checks', slug: 'guides/checks' }, |
| 177 | { label: 'Pull requests into other branches', slug: 'guides/base-branches' }, |
| 178 | { label: 'Labels', slug: 'guides/labels' }, |
| 179 | { label: 'Milestones', slug: 'guides/milestones' }, |
| 180 | { label: 'The merge queue', slug: 'guides/merge-queue' }, |
| 181 | { label: 'Rules', slug: 'guides/rules' }, |
| 182 | { label: 'CODEOWNERS', slug: 'guides/codeowners' }, |
| 183 | { label: 'Forks and branches', slug: 'concepts/forks' }, |
| 184 | ], |
| 185 | }, |
| 186 | { |
| 187 | label: 'Workspaces', |
| 188 | items: [ |
| 189 | { label: 'Accounts and sign-in', slug: 'guides/authentication' }, |
| 190 | { label: 'GitHub', slug: 'guides/github' }, |
| 191 | { label: 'Workspaces and tokens', slug: 'guides/workspaces' }, |
| 192 | { label: 'Access and roles', slug: 'guides/access-and-roles' }, |
| 193 | { label: 'Permissions', slug: 'guides/permissions' }, |
| 194 | { label: 'Teams', slug: 'guides/teams' }, |
| 195 | { label: 'People and teams', slug: 'guides/people-and-teams' }, |
| 196 | { label: 'Managing a repository', slug: 'guides/managing-repositories' }, |
| 197 | { label: 'Releases', slug: 'guides/releases' }, |
| 198 | { label: 'Transferring a repository', slug: 'guides/transferring-repositories' }, |
| 199 | { label: 'Audit log', slug: 'guides/audit-log' }, |
| 200 | { label: 'Usage and billing', slug: 'guides/usage-and-billing' }, |
| 201 | { label: 'Git', slug: 'guides/git' }, |
| 202 | ], |
| 203 | }, |
| 204 | { |
| 205 | label: 'Run g1t yourself', |
| 206 | items: [ |
| 207 | { label: 'With Docker Compose', slug: 'guides/self-hosting' }, |
| 208 | { label: 'How a self-hosted g1t runs', slug: 'guides/self-hosting-architecture' }, |
| 209 | { label: 'Deploy to Cloudflare', slug: 'guides/deploy-to-cloudflare' }, |
| 210 | ], |
| 211 | }, |
| 212 | { |
| 213 | label: 'Architecture', |
| 214 | items: [ |
| 215 | { label: 'Overview', slug: 'architecture/overview' }, |
| 216 | { label: 'How a request is served', slug: 'architecture/requests' }, |
| 217 | { label: 'Services and contracts', slug: 'architecture/services' }, |
| 218 | { label: 'Git', slug: 'architecture/git' }, |
| 219 | { label: 'Events', slug: 'architecture/events' }, |
| 220 | { label: 'Work and the merge queue', slug: 'architecture/work' }, |
| 221 | { label: 'Actions, runners and sandboxes', slug: 'architecture/compute' }, |
| 222 | { label: 'Deployments and telemetry', slug: 'architecture/deployments' }, |
| 223 | { label: 'Data and storage', slug: 'architecture/data' }, |
| 224 | { label: 'Identity and access', slug: 'architecture/identity' }, |
| 225 | { label: 'How g1t ships', slug: 'architecture/shipping' }, |
| 226 | ], |
| 227 | }, |
| 228 | { |
| 229 | label: 'Reference', |
| 230 | items: [ |
| 231 | { label: 'API overview', slug: 'reference/api' }, |
| 232 | { label: 'MCP tools', slug: 'reference/mcp' }, |
| 233 | { label: 'CLI commands', slug: 'reference/cli' }, |
| 234 | { label: 'Rate limits', slug: 'reference/rate-limits' }, |
| 235 | { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } }, |
| 236 | { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' }, |
| 237 | { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' }, |
| 238 | ], |
| 239 | }, |
| 240 | { |
| 241 | label: 'About', |
| 242 | items: [ |
| 243 | { label: "What g1t can't do yet", slug: 'about/limitations' }, |
| 244 | { label: 'An open letter to Cloudflare', slug: 'about/open-letter-to-cloudflare' }, |
| 245 | ], |
| 246 | }, |
| 247 | ...apiGroups, |
| 248 | ], |
| 249 | }), |
| 250 | ], |
| 251 | }); |