g1t/apps/docs/astro.config.mjs

141 lines5,020 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 integrations: [
13 starlight({
14 title: 'g1t docs',
15 description: 'Guides and reference for g1t, the git forge for teams of agents.',
16 components: {
17 Header: './src/components/Header.astro',
18 PageTitle: './src/components/PageTitle.astro',
19 SiteTitle: './src/components/SiteTitle.astro',
20 SocialIcons: './src/components/SocialIcons.astro',
21 },
22 // Each tab under the header shows its own part of the sidebar.
23 routeMiddleware: './src/route-data.ts',
24 expressiveCode: {
25 themes: ['github-dark-default'],
26 // Plain panels with a copy button, without window chrome.
27 defaultProps: { frame: 'none' },
28 styleOverrides: {
29 borderRadius: '0.75rem',
30 borderColor: 'var(--g1t-line)',
31 codeBackground: 'var(--g1t-surface)',
32 codeFontSize: '0.8125rem',
33 frames: {
34 editorBackground: 'var(--g1t-surface)',
35 terminalBackground: 'var(--g1t-surface)',
36 terminalTitlebarBackground: 'var(--g1t-raised)',
37 terminalTitlebarBorderBottomColor: 'var(--g1t-line)',
38 editorTabBarBackground: 'var(--g1t-raised)',
39 shadowColor: 'transparent',
40 },
41 },
42 },
43 logo: { src: '@g1t/theme/mark.svg', alt: '' },
44 favicon: '/favicon.svg',
45 customCss: ['@g1t/theme/tokens.css', './src/styles/g1t.css'],
46 social: [
47 { icon: 'seti:git', label: 'Source on g1t', href: 'https://g1t.sh/syntaqx/g1t' },
48 ],
49 editLink: {
50 baseUrl: 'https://g1t.sh/syntaqx/g1t/blob/main/apps/docs/',
51 },
52 lastUpdated: true,
53 head: [
54 { tag: 'link', attrs: { rel: 'icon', href: '/favicon.ico', sizes: '32x32' } },
55 { tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/icon-192.png' } },
56 { tag: 'link', attrs: { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' } },
57 { tag: 'link', attrs: { rel: 'preconnect', href: 'https://fonts.googleapis.com' } },
58 {
59 tag: 'link',
60 attrs: { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: true },
61 },
62 {
63 tag: 'link',
64 attrs: {
65 rel: 'stylesheet',
66 href: 'https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=JetBrains+Mono:wght@400;500;600&display=swap',
67 },
68 },
69 ],
70 sidebar: [
71 {
72 label: 'Get started',
73 items: [
74 { label: 'Quickstart', slug: 'quickstart' },
75 { label: 'How g1t works', slug: 'concepts/overview' },
76 ],
77 },
78 {
79 label: 'Projects',
80 items: [
81 { label: 'Projects', slug: 'guides/projects' },
82 { label: 'Deployments', slug: 'guides/deployments' },
83 { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' },
84 { label: 'Security', slug: 'guides/security' },
85 ],
86 },
87 {
88 label: 'Agents',
89 items: [
90 { label: 'g1t agents', slug: 'guides/g1t-agents' },
91 { label: 'Guardrails', slug: 'guides/guardrails' },
92 { label: 'Outcomes and plans', slug: 'guides/outcomes' },
93 { label: 'Talking to agents', slug: 'guides/talking-to-agents' },
94 { label: 'Agents, sessions and memory', slug: 'guides/agents-and-memory' },
95 { label: 'Context hub', slug: 'guides/context-hub' },
96 { label: 'Bring your own agent', slug: 'guides/bring-your-own-agent' },
97 ],
98 },
99 {
100 label: 'Connect your tools',
101 items: [
102 { label: 'Integrations', slug: 'guides/integrations' },
103 { label: 'Model providers', slug: 'guides/models' },
104 { label: 'Webhooks', slug: 'guides/webhooks' },
105 { label: 'GitHub Actions', slug: 'guides/actions' },
106 ],
107 },
108 {
109 label: 'Landing changes',
110 items: [
111 { label: 'Pull requests and checks', slug: 'guides/pull-requests' },
112 { label: 'The merge queue', slug: 'guides/merge-queue' },
113 { label: 'Sessions and why-blame', slug: 'guides/why-blame' },
114 { label: 'Forks and branches', slug: 'concepts/forks' },
115 ],
116 },
117 {
118 label: 'Workspaces',
119 items: [
120 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
121 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
122 { label: 'Audit log', slug: 'guides/audit-log' },
123 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
124 { label: 'Git', slug: 'guides/git' },
125 ],
126 },
127 {
128 label: 'Reference',
129 items: [
130 { label: 'API overview', slug: 'reference/api' },
131 { label: 'MCP tools', slug: 'reference/mcp' },
132 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
133 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
134 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
135 ],
136 },
137 ...apiGroups,
138 ],
139 }),
140 ],
141});