g1t/apps/docs/astro.config.mjs

150 lines5,685 bytesCodeBlame
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/g1t-agents/': '/guides/working-with-g1t/',
15 },
16 integrations: [
17 starlight({
18 title: 'g1t docs',
19 description: 'Guides and reference for g1t, where people and agents ship software together.',
20 components: {
21 Footer: './src/components/Footer.astro',
22 Head: './src/components/Head.astro',
23 Header: './src/components/Header.astro',
24 PageTitle: './src/components/PageTitle.astro',
25 SiteTitle: './src/components/SiteTitle.astro',
26 SocialIcons: './src/components/SocialIcons.astro',
27 },
28 // Each tab under the header shows its own part of the sidebar.
29 routeMiddleware: './src/route-data.ts',
30 expressiveCode: {
31 themes: ['github-dark-default'],
32 // Plain panels with a copy button, without window chrome.
33 defaultProps: { frame: 'none' },
34 styleOverrides: {
35 borderRadius: '0.75rem',
36 borderColor: 'var(--g1t-line)',
37 codeBackground: 'var(--g1t-surface)',
38 codeFontSize: '0.8125rem',
39 frames: {
40 editorBackground: 'var(--g1t-surface)',
41 terminalBackground: 'var(--g1t-surface)',
42 terminalTitlebarBackground: 'var(--g1t-raised)',
43 terminalTitlebarBorderBottomColor: 'var(--g1t-line)',
44 editorTabBarBackground: 'var(--g1t-raised)',
45 shadowColor: 'transparent',
46 },
47 },
48 },
49 logo: { src: '@g1t/theme/mark.svg', alt: '' },
50 favicon: '/favicon.svg',
51 customCss: ['@g1t/theme/fonts.css', '@g1t/theme/tokens.css', './src/styles/g1t.css'],
52 editLink: {
53 baseUrl: 'https://g1t.sh/flagon-io/g1t/blob/main/apps/docs/',
54 },
55 lastUpdated: true,
56 head: [
57 { tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '32x32' } },
58 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/icon-192.png' } },
59 { tag: 'link', attrs: { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' } },
60 ],
61 sidebar: [
62 {
63 label: 'Get started',
64 items: [
65 { label: 'Quickstart', slug: 'quickstart' },
66 { label: 'How g1t works', slug: 'concepts/overview' },
67 { label: 'Search and Explore', slug: 'guides/search' },
68 { label: 'Status and incidents', slug: 'guides/status' },
69 ],
70 },
71 {
72 label: 'Projects',
73 items: [
74 { label: 'Projects', slug: 'guides/projects' },
75 { label: 'Deployments', slug: 'guides/deployments' },
76 { label: 'Packages', slug: 'guides/packages' },
77 { label: 'Container images', slug: 'guides/containers' },
78 { label: 'npm', slug: 'guides/npm' },
79 { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' },
80 { label: 'Security', slug: 'guides/security' },
81 ],
82 },
83 {
84 label: 'Agents',
85 items: [
86 { label: "g1t's agent", slug: 'guides/working-with-g1t' },
87 { label: 'Guardrails', slug: 'guides/guardrails' },
88 { label: 'Outcomes and plans', slug: 'guides/outcomes' },
89 { label: 'Talking to agents', slug: 'guides/talking-to-agents' },
90 { label: 'Agents, sessions and memory', slug: 'guides/agents-and-memory' },
91 { label: 'Context hub', slug: 'guides/context-hub' },
92 { label: 'Bring your own agent', slug: 'guides/bring-your-own-agent' },
93 ],
94 },
95 {
96 label: 'Connect your tools',
97 items: [
98 { label: 'Integrations', slug: 'guides/integrations' },
99 { label: 'Model providers', slug: 'guides/models' },
100 { label: 'Webhooks', slug: 'guides/webhooks' },
101 { label: 'GitHub Actions', slug: 'guides/actions' },
102 { label: 'Self-hosted runners', slug: 'guides/self-hosted-runners' },
103 ],
104 },
105 {
106 label: 'Landing changes',
107 items: [
108 { label: 'Pull requests and checks', slug: 'guides/pull-requests' },
109 { label: 'The merge queue', slug: 'guides/merge-queue' },
110 { label: 'Sessions and why-blame', slug: 'guides/why-blame' },
111 { label: 'Forks and branches', slug: 'concepts/forks' },
112 ],
113 },
114 {
115 label: 'Workspaces',
116 items: [
117 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
118 { label: 'GitHub', slug: 'guides/github' },
119 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
120 { label: 'Access and roles', slug: 'guides/access-and-roles' },
121 { label: 'Managing a repository', slug: 'guides/managing-repositories' },
122 { label: 'Transferring a repository', slug: 'guides/transferring-repositories' },
123 { label: 'Audit log', slug: 'guides/audit-log' },
124 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
125 { label: 'Git', slug: 'guides/git' },
126 { label: 'Run g1t yourself', slug: 'guides/self-hosting' },
127 ],
128 },
129 {
130 label: 'Reference',
131 items: [
132 { label: 'API overview', slug: 'reference/api' },
133 { label: 'MCP tools', slug: 'reference/mcp' },
134 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
135 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
136 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
137 ],
138 },
139 {
140 label: 'About',
141 items: [
142 { label: "What g1t can't do yet", slug: 'about/limitations' },
143 { label: 'An open letter to Cloudflare', slug: 'about/open-letter-to-cloudflare' },
144 ],
145 },
146 ...apiGroups,
147 ],
148 }),
149 ],
150});