Skip to content
233 linesCodeBlameRaw
1// @ts-check
2import starlight from '@astrojs/starlight';
3import { defineConfig } from 'astro/config';
4
5import { generateApiReference } from './scripts/api-reference.mjs';
6
7// A page per REST operation, written from the OpenAPI document.
8const apiGroups = generateApiReference();
9
10export 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: 'Sessions and why-blame', slug: 'guides/why-blame' },
157 { label: 'Memory', slug: 'guides/memory' },
158 ],
159 },
160 {
161 label: 'Connect your tools',
162 items: [
163 { label: 'Integrations', slug: 'guides/integrations' },
164 { label: 'Webhooks', slug: 'guides/webhooks' },
165 { label: 'GitHub Actions', slug: 'guides/actions' },
166 { label: 'Self-hosted runners', slug: 'guides/self-hosted-runners' },
167 { label: 'Guardrails', slug: 'guides/guardrails' },
168 ],
169 },
170 {
171 label: 'Landing changes',
172 items: [
173 { label: 'Pull requests and checks', slug: 'guides/pull-requests' },
174 { label: 'Checks', slug: 'guides/checks' },
175 { label: 'Pull requests into other branches', slug: 'guides/base-branches' },
176 { label: 'Labels', slug: 'guides/labels' },
177 { label: 'Milestones', slug: 'guides/milestones' },
178 { label: 'The merge queue', slug: 'guides/merge-queue' },
179 { label: 'Rules', slug: 'guides/rules' },
180 { label: 'CODEOWNERS', slug: 'guides/codeowners' },
181 { label: 'Forks and branches', slug: 'concepts/forks' },
182 ],
183 },
184 {
185 label: 'Workspaces',
186 items: [
187 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
188 { label: 'GitHub', slug: 'guides/github' },
189 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
190 { label: 'Access and roles', slug: 'guides/access-and-roles' },
191 { label: 'Permissions', slug: 'guides/permissions' },
192 { label: 'Teams', slug: 'guides/teams' },
193 { label: 'People and teams', slug: 'guides/people-and-teams' },
194 { label: 'Managing a repository', slug: 'guides/managing-repositories' },
195 { label: 'Releases', slug: 'guides/releases' },
196 { label: 'Transferring a repository', slug: 'guides/transferring-repositories' },
197 { label: 'Audit log', slug: 'guides/audit-log' },
198 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
199 { label: 'Git', slug: 'guides/git' },
200 ],
201 },
202 {
203 label: 'Run g1t yourself',
204 items: [
205 { label: 'With Docker Compose', slug: 'guides/self-hosting' },
206 { label: 'How a self-hosted g1t runs', slug: 'guides/self-hosting-architecture' },
207 { label: 'Deploy to Cloudflare', slug: 'guides/deploy-to-cloudflare' },
208 ],
209 },
210 {
211 label: 'Reference',
212 items: [
213 { label: 'API overview', slug: 'reference/api' },
214 { label: 'MCP tools', slug: 'reference/mcp' },
215 { label: 'CLI commands', slug: 'reference/cli' },
216 { label: 'Rate limits', slug: 'reference/rate-limits' },
217 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
218 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
219 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
220 ],
221 },
222 {
223 label: 'About',
224 items: [
225 { label: "What g1t can't do yet", slug: 'about/limitations' },
226 { label: 'An open letter to Cloudflare', slug: 'about/open-letter-to-cloudflare' },
227 ],
228 },
229 ...apiGroups,
230 ],
231 }),
232 ],
233});