g1t/apps/docs/astro.config.mjs

127 lines4,341 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 { icon: 'github', label: 'Source on GitHub', href: 'https://github.com/syntaqx/g1t' },
49 ],
50 editLink: {
51 baseUrl: 'https://github.com/syntaqx/g1t/edit/main/apps/docs/',
52 },
53 lastUpdated: true,
54 head: [
55 { tag: 'link', attrs: { rel: 'preconnect', href: 'https://fonts.googleapis.com' } },
56 {
57 tag: 'link',
58 attrs: { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: true },
59 },
60 {
61 tag: 'link',
62 attrs: {
63 rel: 'stylesheet',
64 href: 'https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=JetBrains+Mono:wght@400;500;600&display=swap',
65 },
66 },
67 ],
68 sidebar: [
69 {
70 label: 'Get started',
71 items: [
72 { label: 'Quickstart', slug: 'quickstart' },
73 { label: 'How g1t works', slug: 'concepts/overview' },
74 ],
75 },
76 {
77 label: 'Agents',
78 items: [
79 { label: 'g1t agents', slug: 'guides/g1t-agents' },
80 { label: 'Outcomes and plans', slug: 'guides/outcomes' },
81 { label: 'Talking to agents', slug: 'guides/talking-to-agents' },
82 { label: 'Bring your own agent', slug: 'guides/bring-your-own-agent' },
83 ],
84 },
85 {
86 label: 'Connect your tools',
87 items: [
88 { label: 'Integrations', slug: 'guides/integrations' },
89 { label: 'Model providers', slug: 'guides/models' },
90 { label: 'Webhooks', slug: 'guides/webhooks' },
91 { label: 'GitHub Actions', slug: 'guides/actions' },
92 { label: 'Secrets and variables', slug: 'guides/secrets-and-variables' },
93 ],
94 },
95 {
96 label: 'Landing changes',
97 items: [
98 { label: 'The merge queue', slug: 'guides/merge-queue' },
99 { label: 'Deployments', slug: 'guides/deployments' },
100 { label: 'Sessions and why-blame', slug: 'guides/why-blame' },
101 { label: 'Forks and branches', slug: 'concepts/forks' },
102 ],
103 },
104 {
105 label: 'Workspaces',
106 items: [
107 { label: 'Accounts and sign-in', slug: 'guides/authentication' },
108 { label: 'Workspaces and tokens', slug: 'guides/workspaces' },
109 { label: 'Usage and billing', slug: 'guides/usage-and-billing' },
110 { label: 'Git', slug: 'guides/git' },
111 ],
112 },
113 {
114 label: 'Reference',
115 items: [
116 { label: 'API overview', slug: 'reference/api' },
117 { label: 'MCP tools', slug: 'reference/mcp' },
118 { label: 'Try it in the explorer', link: '/api/reference/', attrs: { target: '_self' } },
119 { label: 'OpenAPI document', link: 'https://api.g1t.sh/openapi.json' },
120 { label: 'llms.txt', link: 'https://g1t.sh/llms.txt' },
121 ],
122 },
123 ...apiGroups,
124 ],
125 }),
126 ],
127});