pr_01m47d24b0e6n91zwymwxg0vpx/apps/docs/astro.config.mjs

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