git0 0.3.17 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/README.md +20 -0
- package/docs/app/(home)/docs-home.css +235 -0
- package/docs/app/(home)/layout.tsx +12 -0
- package/docs/app/(home)/page.tsx +27 -0
- package/docs/app/docs/[[...slug]]/page.tsx +84 -0
- package/docs/app/docs/api/docs-search/route.ts +11 -0
- package/docs/app/docs/layout.tsx +16 -0
- package/docs/app/docs/llms-full.txt/route.ts +15 -0
- package/docs/app/docs/llms.mdx/docs/[[...slug]]/route.ts +24 -0
- package/docs/app/globals.css +814 -0
- package/docs/app/layout.config.tsx +32 -0
- package/docs/app/layout.tsx +22 -0
- package/docs/app/provider.tsx +20 -0
- package/docs/cli.json +11 -0
- package/docs/components/DocsHomepage/code-example.tsx +123 -0
- package/docs/components/DocsHomepage/features-grid.tsx +92 -0
- package/docs/components/DocsHomepage/footer.tsx +58 -0
- package/docs/components/DocsHomepage/hero-section.tsx +114 -0
- package/docs/components/DocsHomepage/project-types.tsx +114 -0
- package/docs/components/fumadocs/ai/ask-ai-dropdown.tsx +299 -0
- package/docs/components/fumadocs/ai/llm-copy-button.tsx +61 -0
- package/docs/components/fumadocs/api/api-page.client.tsx +7 -0
- package/docs/components/fumadocs/api/api-page.tsx +7 -0
- package/docs/components/fumadocs/layout/breadcrumb.tsx +36 -0
- package/docs/components/fumadocs/layout/search.tsx +55 -0
- package/docs/components/fumadocs/layout/theme-dropdown.tsx +3 -0
- package/docs/components/fumadocs/layout/theme-provider.tsx +15 -0
- package/docs/components/fumadocs/layout/theme-toggle.tsx +40 -0
- package/docs/components/ui/badge.tsx +50 -0
- package/docs/components/ui/button.tsx +66 -0
- package/docs/components/ui/collapsible.tsx +44 -0
- package/docs/components/ui/slider.tsx +36 -0
- package/docs/components/ui/tooltip.tsx +63 -0
- package/docs/components/ui/video-modal.tsx +238 -0
- package/docs/content/docs/fm.mdx +11 -0
- package/{docs-config/src/functions/git0.md → docs/content/docs/git0.mdx} +4 -1
- package/{docs-config/src/functions/github-api.md → docs/content/docs/github-api.mdx} +4 -1
- package/{docs-config/src/functions/index.md → docs/content/docs/index.mdx} +9 -14
- package/docs/content/docs/meta.json +15 -0
- package/docs/content/docs/modules.mdx +10 -0
- package/docs/lib/fumadocs/customize-docs.ts +47 -0
- package/docs/lib/fumadocs/generate-api-docs.ts +73 -0
- package/docs/lib/fumadocs/source.tsx +50 -0
- package/docs/lib/utils.ts +10 -0
- package/docs/mdx-components.tsx +21 -0
- package/docs/next-env.d.ts +7 -0
- package/docs/next.config.ts +35 -0
- package/docs/package.json +61 -0
- package/docs/postcss.config.mjs +5 -0
- package/docs/public/apple-touch-icon.png +0 -0
- package/docs/public/favicon-192.png +0 -0
- package/docs/public/favicon-512.png +0 -0
- package/docs/public/favicon.ico +0 -0
- package/docs/public/manifest.webmanifest +14 -0
- package/docs/source.config.ts +29 -0
- package/docs/tsconfig.json +50 -0
- package/docs/vite.config.ts +2 -0
- package/docs/wrangler.jsonc +13 -0
- package/package.json +3 -2
- package/docs/404.html +0 -26
- package/docs/CNAME +0 -1
- package/docs/Footer/index.html +0 -26
- package/docs/assets/css/styles.3dd00f8d.css +0 -1
- package/docs/assets/js/17896441.79ceefeb.js +0 -1
- package/docs/assets/js/1df93b7f.1385eba0.js +0 -2
- package/docs/assets/js/1df93b7f.1385eba0.js.LICENSE.txt +0 -6
- package/docs/assets/js/22dd74f7.e13ac7a4.js +0 -1
- package/docs/assets/js/237.daf7efdf.js +0 -1
- package/docs/assets/js/278.1628756c.js +0 -1
- package/docs/assets/js/28ab763d.192aa3bb.js +0 -1
- package/docs/assets/js/299d276b.c9496717.js +0 -1
- package/docs/assets/js/577.78325c02.js +0 -1
- package/docs/assets/js/591.2156b33d.js +0 -2
- package/docs/assets/js/591.2156b33d.js.LICENSE.txt +0 -61
- package/docs/assets/js/5e95c892.bd6c1093.js +0 -1
- package/docs/assets/js/68cef36b.e5b1975b.js +0 -1
- package/docs/assets/js/a7456010.3054873b.js +0 -1
- package/docs/assets/js/a7bd4aaa.87229397.js +0 -1
- package/docs/assets/js/a94703ab.6d39a596.js +0 -1
- package/docs/assets/js/a9cef9d5.a7253e41.js +0 -1
- package/docs/assets/js/aba21aa0.dfebd789.js +0 -1
- package/docs/assets/js/ac46717f.32345167.js +0 -2
- package/docs/assets/js/ac46717f.32345167.js.LICENSE.txt +0 -6
- package/docs/assets/js/c3a618e1.1c56fb03.js +0 -590
- package/docs/assets/js/main.1f646b09.js +0 -2
- package/docs/assets/js/main.1f646b09.js.LICENSE.txt +0 -68
- package/docs/assets/js/runtime~main.f69f8f44.js +0 -1
- package/docs/functions/fm/index.html +0 -26
- package/docs/functions/git0/index.html +0 -48
- package/docs/functions/github-api/index.html +0 -149
- package/docs/functions/index.html +0 -891
- package/docs/functions/modules/index.html +0 -31
- package/docs/index.html +0 -26
- package/docs/lunr-index-1749760982052.json +0 -1
- package/docs/lunr-index.json +0 -1
- package/docs/search-doc-1749760982052.json +0 -1
- package/docs/search-doc.json +0 -1
- package/docs/sitemap.xml +0 -1
- package/docs-config/.docusaurus/DONT-EDIT-THIS-FOLDER +0 -5
- package/docs-config/.docusaurus/client-manifest.json +0 -271
- package/docs-config/.docusaurus/client-modules.js +0 -8
- package/docs-config/.docusaurus/codeTranslations.json +0 -1
- package/docs-config/.docusaurus/docusaurus-lunr-search/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/__mdx-loader-dependency.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/docs-175.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/index-466.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-fm-md-a9c.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-1-md-d3e.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-md-299.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-github-api-md-28a.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-globals-md-4a8.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-index-md-c3a.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-modules-md-68c.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-index-md-d14.json +0 -21
- package/docs-config/.docusaurus/docusaurus-plugin-content-pages/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-google-gtag/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus.config.mjs +0 -378
- package/docs-config/.docusaurus/globalData.json +0 -70
- package/docs-config/.docusaurus/i18n.json +0 -17
- package/docs-config/.docusaurus/lunr.client.js +0 -5
- package/docs-config/.docusaurus/registry.js +0 -16
- package/docs-config/.docusaurus/routes.js +0 -67
- package/docs-config/.docusaurus/routesChunkNames.json +0 -49
- package/docs-config/.docusaurus/site-metadata.json +0 -51
- package/docs-config/.docusaurus/site-storage.json +0 -4
- package/docs-config/config/customize-docs.js +0 -31
- package/docs-config/config/docs-theme.css +0 -358
- package/docs-config/config/openapi.mustache +0 -39
- package/docs-config/config/sidebars.ts +0 -21
- package/docs-config/config/typedoc.json +0 -40
- package/docs-config/docusaurus.config.ts +0 -341
- package/docs-config/package.json +0 -40
- package/docs-config/src/functions/fm.md +0 -1
- package/docs-config/src/functions/modules.md +0 -5
- package/docs-config/src/functions/typedoc-sidebar.cjs +0 -22
- package/docs-config/src/pages/Footer.tsx +0 -67
- package/docs-config/src/pages/index.tsx +0 -433
- package/docs-config/static/CNAME +0 -1
- package/docs-config/tsconfig.json +0 -27
package/docs/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# git0 docs
|
|
2
|
+
|
|
3
|
+
The [git0.js.org](https://git0.js.org) site, built from
|
|
4
|
+
[`starter-templates/template-fumadocs`](../../../starter-templates/template-fumadocs)
|
|
5
|
+
(Next.js + Fumadocs).
|
|
6
|
+
|
|
7
|
+
| Path | What it is |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `app/(home)/page.tsx` | The landing page |
|
|
10
|
+
| `components/DocsHomepage/` | Landing page sections — hero, features, usage, project types, footer |
|
|
11
|
+
| `content/docs/` | Docs pages (MDX); sidebar order in `meta.json` |
|
|
12
|
+
| `lib/fumadocs/customize-docs.ts` | Site title, description and GitHub links |
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bun install
|
|
16
|
+
bun run dev # local dev server
|
|
17
|
+
bun run build # production build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or from `packages/git0-repo-downloader`: `bun run docs` / `bun run docs:build`.
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
/* Beige light theme */
|
|
7
|
+
:root {
|
|
8
|
+
--background: oklch(0.96 0.02 85);
|
|
9
|
+
--foreground: oklch(0.25 0.02 60);
|
|
10
|
+
--card: oklch(0.93 0.02 85);
|
|
11
|
+
--card-foreground: oklch(0.25 0.02 60);
|
|
12
|
+
--popover: oklch(0.93 0.02 85);
|
|
13
|
+
--popover-foreground: oklch(0.25 0.02 60);
|
|
14
|
+
--primary: oklch(0.45 0.12 200);
|
|
15
|
+
--primary-foreground: oklch(0.98 0.01 85);
|
|
16
|
+
--secondary: oklch(0.88 0.03 85);
|
|
17
|
+
--secondary-foreground: oklch(0.25 0.02 60);
|
|
18
|
+
--muted: oklch(0.88 0.03 85);
|
|
19
|
+
--muted-foreground: oklch(0.5 0.02 60);
|
|
20
|
+
--accent: oklch(0.65 0.15 55);
|
|
21
|
+
--accent-foreground: oklch(0.25 0.02 60);
|
|
22
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
23
|
+
--destructive-foreground: oklch(0.98 0.01 85);
|
|
24
|
+
--border: oklch(0.82 0.03 85);
|
|
25
|
+
--input: oklch(0.88 0.03 85);
|
|
26
|
+
--ring: oklch(0.45 0.12 200);
|
|
27
|
+
--chart-1: oklch(0.45 0.12 200);
|
|
28
|
+
--chart-2: oklch(0.65 0.15 55);
|
|
29
|
+
--chart-3: oklch(0.55 0.1 150);
|
|
30
|
+
--chart-4: oklch(0.6 0.15 30);
|
|
31
|
+
--chart-5: oklch(0.5 0.1 280);
|
|
32
|
+
--radius: 0.625rem;
|
|
33
|
+
--sidebar: oklch(0.93 0.02 85);
|
|
34
|
+
--sidebar-foreground: oklch(0.25 0.02 60);
|
|
35
|
+
--sidebar-primary: oklch(0.45 0.12 200);
|
|
36
|
+
--sidebar-primary-foreground: oklch(0.98 0.01 85);
|
|
37
|
+
--sidebar-accent: oklch(0.88 0.03 85);
|
|
38
|
+
--sidebar-accent-foreground: oklch(0.25 0.02 60);
|
|
39
|
+
--sidebar-border: oklch(0.82 0.03 85);
|
|
40
|
+
--sidebar-ring: oklch(0.45 0.12 200);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Beige dark theme */
|
|
44
|
+
.dark {
|
|
45
|
+
--background: oklch(0.18 0.02 60);
|
|
46
|
+
--foreground: oklch(0.92 0.02 85);
|
|
47
|
+
--card: oklch(0.22 0.02 60);
|
|
48
|
+
--card-foreground: oklch(0.92 0.02 85);
|
|
49
|
+
--popover: oklch(0.22 0.02 60);
|
|
50
|
+
--popover-foreground: oklch(0.92 0.02 85);
|
|
51
|
+
--primary: oklch(0.65 0.15 55);
|
|
52
|
+
--primary-foreground: oklch(0.18 0.02 60);
|
|
53
|
+
--secondary: oklch(0.28 0.02 60);
|
|
54
|
+
--secondary-foreground: oklch(0.92 0.02 85);
|
|
55
|
+
--muted: oklch(0.28 0.02 60);
|
|
56
|
+
--muted-foreground: oklch(0.65 0.02 85);
|
|
57
|
+
--accent: oklch(0.65 0.15 55);
|
|
58
|
+
--accent-foreground: oklch(0.18 0.02 60);
|
|
59
|
+
--destructive: oklch(0.5 0.2 27);
|
|
60
|
+
--destructive-foreground: oklch(0.92 0.02 85);
|
|
61
|
+
--border: oklch(0.32 0.02 60);
|
|
62
|
+
--input: oklch(0.28 0.02 60);
|
|
63
|
+
--ring: oklch(0.65 0.15 55);
|
|
64
|
+
--chart-1: oklch(0.65 0.15 55);
|
|
65
|
+
--chart-2: oklch(0.55 0.12 200);
|
|
66
|
+
--chart-3: oklch(0.6 0.1 150);
|
|
67
|
+
--chart-4: oklch(0.65 0.15 30);
|
|
68
|
+
--chart-5: oklch(0.55 0.1 280);
|
|
69
|
+
--sidebar: oklch(0.22 0.02 60);
|
|
70
|
+
--sidebar-foreground: oklch(0.92 0.02 85);
|
|
71
|
+
--sidebar-primary: oklch(0.65 0.15 55);
|
|
72
|
+
--sidebar-primary-foreground: oklch(0.18 0.02 60);
|
|
73
|
+
--sidebar-accent: oklch(0.28 0.02 60);
|
|
74
|
+
--sidebar-accent-foreground: oklch(0.92 0.02 85);
|
|
75
|
+
--sidebar-border: oklch(0.32 0.02 60);
|
|
76
|
+
--sidebar-ring: oklch(0.65 0.15 55);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@theme inline {
|
|
80
|
+
--color-background: var(--background);
|
|
81
|
+
--color-foreground: var(--foreground);
|
|
82
|
+
--color-card: var(--card);
|
|
83
|
+
--color-card-foreground: var(--card-foreground);
|
|
84
|
+
--color-popover: var(--popover);
|
|
85
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
86
|
+
--color-primary: var(--primary);
|
|
87
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
88
|
+
--color-secondary: var(--secondary);
|
|
89
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
90
|
+
--color-muted: var(--muted);
|
|
91
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
92
|
+
--color-accent: var(--accent);
|
|
93
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
94
|
+
--color-destructive: var(--destructive);
|
|
95
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
96
|
+
--color-border: var(--border);
|
|
97
|
+
--color-input: var(--input);
|
|
98
|
+
--color-ring: var(--ring);
|
|
99
|
+
--color-chart-1: var(--chart-1);
|
|
100
|
+
--color-chart-2: var(--chart-2);
|
|
101
|
+
--color-chart-3: var(--chart-3);
|
|
102
|
+
--color-chart-4: var(--chart-4);
|
|
103
|
+
--color-chart-5: var(--chart-5);
|
|
104
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
105
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
106
|
+
--radius-lg: var(--radius);
|
|
107
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
108
|
+
--color-sidebar: var(--sidebar);
|
|
109
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
110
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
111
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
112
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
113
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
114
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
115
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@layer base {
|
|
119
|
+
* {
|
|
120
|
+
@apply border-border outline-ring/50;
|
|
121
|
+
}
|
|
122
|
+
body {
|
|
123
|
+
@apply bg-background text-foreground;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Added animated border gradient keyframes */
|
|
128
|
+
@keyframes border-rotate {
|
|
129
|
+
0% {
|
|
130
|
+
--border-angle: 0deg;
|
|
131
|
+
}
|
|
132
|
+
100% {
|
|
133
|
+
--border-angle: 360deg;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes shimmer {
|
|
138
|
+
0% {
|
|
139
|
+
background-position: -200% 0;
|
|
140
|
+
}
|
|
141
|
+
100% {
|
|
142
|
+
background-position: 200% 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes pulse-glow {
|
|
147
|
+
0%,
|
|
148
|
+
100% {
|
|
149
|
+
opacity: 0.4;
|
|
150
|
+
}
|
|
151
|
+
50% {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@keyframes float {
|
|
157
|
+
0%,
|
|
158
|
+
100% {
|
|
159
|
+
transform: translateY(0px);
|
|
160
|
+
}
|
|
161
|
+
50% {
|
|
162
|
+
transform: translateY(-10px);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@keyframes gradient-shift {
|
|
167
|
+
0% {
|
|
168
|
+
background-position: 0% 50%;
|
|
169
|
+
}
|
|
170
|
+
50% {
|
|
171
|
+
background-position: 100% 50%;
|
|
172
|
+
}
|
|
173
|
+
100% {
|
|
174
|
+
background-position: 0% 50%;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Animated border card styles */
|
|
179
|
+
.animated-border-card {
|
|
180
|
+
position: relative;
|
|
181
|
+
background: var(--card);
|
|
182
|
+
border-radius: var(--radius);
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.animated-border-card::before {
|
|
187
|
+
content: "";
|
|
188
|
+
position: absolute;
|
|
189
|
+
inset: 0;
|
|
190
|
+
border-radius: var(--radius);
|
|
191
|
+
padding: 1px;
|
|
192
|
+
background: linear-gradient(var(--border-angle, 0deg), transparent 40%, var(--primary) 50%, transparent 60%);
|
|
193
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
194
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
195
|
+
-webkit-mask-composite: xor;
|
|
196
|
+
mask-composite: exclude;
|
|
197
|
+
animation: border-rotate 4s linear infinite;
|
|
198
|
+
opacity: 0;
|
|
199
|
+
transition: opacity 0.3s ease;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.animated-border-card:hover::before {
|
|
203
|
+
opacity: 1;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Shimmer text effect */
|
|
207
|
+
.shimmer-text {
|
|
208
|
+
background: linear-gradient(
|
|
209
|
+
90deg,
|
|
210
|
+
var(--foreground) 0%,
|
|
211
|
+
var(--primary) 25%,
|
|
212
|
+
var(--foreground) 50%,
|
|
213
|
+
var(--primary) 75%,
|
|
214
|
+
var(--foreground) 100%
|
|
215
|
+
);
|
|
216
|
+
background-size: 200% auto;
|
|
217
|
+
-webkit-background-clip: text;
|
|
218
|
+
background-clip: text;
|
|
219
|
+
-webkit-text-fill-color: transparent;
|
|
220
|
+
animation: shimmer 3s linear infinite;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Updated grid colors for both themes */
|
|
224
|
+
.animated-grid-bg {
|
|
225
|
+
background-image: linear-gradient(to right, var(--border) 1px, transparent 1px),
|
|
226
|
+
linear-gradient(to bottom, var(--border) 1px, transparent 1px);
|
|
227
|
+
background-size: 60px 60px;
|
|
228
|
+
animation: gradient-shift 20s ease infinite;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.grid-glow {
|
|
232
|
+
background: radial-gradient(ellipse at center, var(--primary) 0%, transparent 70%);
|
|
233
|
+
opacity: 0.15;
|
|
234
|
+
animation: pulse-glow 4s ease-in-out infinite;
|
|
235
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file layout.tsx
|
|
3
|
+
* @description Layout component for the home page.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import { HomeLayout } from 'fumadocs-ui/layouts/home';
|
|
7
|
+
import { baseOptions } from '@/app/layout.config';
|
|
8
|
+
|
|
9
|
+
export default function Layout({ children }: { children: ReactNode }) {
|
|
10
|
+
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
|
|
11
|
+
}
|
|
12
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file page.tsx
|
|
3
|
+
* @description git0 landing page.
|
|
4
|
+
*/
|
|
5
|
+
import { HeroSection } from "@/components/DocsHomepage/hero-section"
|
|
6
|
+
import { FeaturesGrid } from "@/components/DocsHomepage/features-grid"
|
|
7
|
+
import { CodeExample } from "@/components/DocsHomepage/code-example"
|
|
8
|
+
import { ProjectTypes } from "@/components/DocsHomepage/project-types"
|
|
9
|
+
import { Footer } from "@/components/DocsHomepage/footer"
|
|
10
|
+
import { Inter } from "next/font/google"
|
|
11
|
+
import "./docs-home.css"
|
|
12
|
+
|
|
13
|
+
const inter = Inter({
|
|
14
|
+
subsets: ['latin'],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default function Home() {
|
|
18
|
+
return (
|
|
19
|
+
<main className={`${inter.className} min-h-screen bg-background`}>
|
|
20
|
+
<HeroSection />
|
|
21
|
+
<FeaturesGrid />
|
|
22
|
+
<CodeExample />
|
|
23
|
+
<ProjectTypes />
|
|
24
|
+
<Footer />
|
|
25
|
+
</main>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file page.tsx
|
|
3
|
+
* @description Dynamic documentation page component that renders MDX content.
|
|
4
|
+
*/
|
|
5
|
+
import { source } from '@/lib/fumadocs/source';
|
|
6
|
+
import {
|
|
7
|
+
DocsBody,
|
|
8
|
+
DocsDescription,
|
|
9
|
+
DocsPage,
|
|
10
|
+
DocsTitle,
|
|
11
|
+
} from 'fumadocs-ui/page';
|
|
12
|
+
import { notFound } from 'next/navigation';
|
|
13
|
+
import { getMDXComponents } from '@/mdx-components';
|
|
14
|
+
import type { Metadata } from 'next';
|
|
15
|
+
import { AskAIDropdown } from '@/components/fumadocs/ai/ask-ai-dropdown';
|
|
16
|
+
import { LLMCopyButton } from '@/components/fumadocs/ai/llm-copy-button';
|
|
17
|
+
import { Breadcrumb } from '@/components/fumadocs/layout/breadcrumb';
|
|
18
|
+
import { docsConfig } from '@/lib/fumadocs/customize-docs';
|
|
19
|
+
import { getGithubLastEdit } from 'fumadocs-core/content/github';
|
|
20
|
+
|
|
21
|
+
export default async function Page(props: {
|
|
22
|
+
params: Promise<{ slug?: string[] }>;
|
|
23
|
+
}) {
|
|
24
|
+
const params = await props.params;
|
|
25
|
+
const page = source.getPage(params.slug);
|
|
26
|
+
|
|
27
|
+
if (!page) {
|
|
28
|
+
notFound();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const data = page.data as any;
|
|
32
|
+
const MDX = data.body;
|
|
33
|
+
|
|
34
|
+
// The GitHub API is rate-limited; a missing date must not fail the build.
|
|
35
|
+
const lastUpdate = await getGithubLastEdit({
|
|
36
|
+
owner: 'OpenSourceAGI',
|
|
37
|
+
repo: 'dev-tools-starter-agent',
|
|
38
|
+
path: `packages/git0-repo-downloader/docs/content/docs/${page.path}`,
|
|
39
|
+
}).catch(() => null);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<DocsPage toc={data.toc} full={data.full} lastUpdate={lastUpdate ?? undefined}>
|
|
43
|
+
<Breadcrumb tree={source.pageTree} />
|
|
44
|
+
<DocsTitle>{page.data.title}</DocsTitle>
|
|
45
|
+
<DocsDescription>{page.data.description}</DocsDescription>
|
|
46
|
+
<DocsBody>
|
|
47
|
+
<div className="flex flex-row gap-2 items-center border-b pt-2 pb-6">
|
|
48
|
+
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
|
|
49
|
+
<AskAIDropdown
|
|
50
|
+
markdownUrl={`${page.url}.mdx`}
|
|
51
|
+
githubUrl={docsConfig.githubDocs ? `${docsConfig.githubDocs}/${page.path}` : undefined}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<MDX components={getMDXComponents()} />
|
|
56
|
+
</DocsBody>
|
|
57
|
+
</DocsPage>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export async function generateStaticParams() {
|
|
62
|
+
return source.generateParams();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function generateMetadata(props: {
|
|
66
|
+
params: Promise<{ slug?: string[] }>;
|
|
67
|
+
}) {
|
|
68
|
+
const params = await props.params;
|
|
69
|
+
const page = source.getPage(params.slug);
|
|
70
|
+
if (!page) notFound();
|
|
71
|
+
const image = ['/docs-og', ...(params.slug ?? []), 'image.png'].join('/');
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
title: page.data.title,
|
|
75
|
+
description: page.data.description,
|
|
76
|
+
openGraph: {
|
|
77
|
+
images: image,
|
|
78
|
+
},
|
|
79
|
+
twitter: {
|
|
80
|
+
card: 'summary_large_image',
|
|
81
|
+
images: image,
|
|
82
|
+
},
|
|
83
|
+
} satisfies Metadata;
|
|
84
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file route.ts
|
|
3
|
+
* @description API route for documentation search using Orama.
|
|
4
|
+
*/
|
|
5
|
+
import { source } from '@/lib/fumadocs/source';
|
|
6
|
+
import { createFromSource } from 'fumadocs-core/search/server';
|
|
7
|
+
|
|
8
|
+
// it should be cached forever
|
|
9
|
+
export const revalidate = false;
|
|
10
|
+
|
|
11
|
+
export const { staticGET: GET } = createFromSource(source);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file layout.tsx
|
|
3
|
+
* @description Layout component for documentation pages.
|
|
4
|
+
*/
|
|
5
|
+
import { source } from '@/lib/fumadocs/source';
|
|
6
|
+
import { DocsLayout } from 'fumadocs-ui/layouts/notebook';
|
|
7
|
+
import type { ReactNode } from 'react';
|
|
8
|
+
import { baseOptions } from '@/app/layout.config';
|
|
9
|
+
|
|
10
|
+
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
|
11
|
+
return (
|
|
12
|
+
<DocsLayout tree={source.pageTree} {...baseOptions}>
|
|
13
|
+
{children}
|
|
14
|
+
</DocsLayout>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file route.ts
|
|
3
|
+
* @description API route that generates a full text version of the documentation for LLM consumption.
|
|
4
|
+
*/
|
|
5
|
+
import { source, getLLMText } from "@/lib/fumadocs/source";
|
|
6
|
+
|
|
7
|
+
// cached forever
|
|
8
|
+
export const revalidate = false;
|
|
9
|
+
|
|
10
|
+
export async function GET() {
|
|
11
|
+
const scan = source.getPages().map(getLLMText);
|
|
12
|
+
const scanned = await Promise.all(scan);
|
|
13
|
+
|
|
14
|
+
return new Response(scanned.join("\n\n"));
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getLLMText, source } from "@/lib/fumadocs/source";
|
|
2
|
+
import { notFound } from "next/navigation";
|
|
3
|
+
|
|
4
|
+
export const revalidate = false;
|
|
5
|
+
|
|
6
|
+
export async function GET(
|
|
7
|
+
_req: Request,
|
|
8
|
+
{ params }: { params: Promise<{ slug?: string[] }> },
|
|
9
|
+
) {
|
|
10
|
+
const { slug } = await params;
|
|
11
|
+
const cleanSlug = slug?.map((s, i) => i === slug.length - 1 ? s.replace(/\.mdx$/, '') : s);
|
|
12
|
+
const page = source.getPage(cleanSlug);
|
|
13
|
+
if (!page) notFound();
|
|
14
|
+
|
|
15
|
+
return new Response(await getLLMText(page), {
|
|
16
|
+
headers: {
|
|
17
|
+
"Content-Type": "text/plain; charset=utf-8",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function generateStaticParams() {
|
|
23
|
+
return source.generateParams();
|
|
24
|
+
}
|