Skip to content

Commit 508cb74

Browse files
committed
migrate over docs ssite
1 parent f1942b5 commit 508cb74

31 files changed

+309
-771
lines changed

apps/docs/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# test & build
1010
/coverage
11-
/.next/
11+
.next/
1212
/out/
1313
/build
1414
*.tsbuildinfo

apps/docs/README.md

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,75 @@
1-
# coda-docs
1+
# Coda Documentation
22

3-
This is a Next.js application generated with
4-
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
3+
This is the documentation site for Coda, built with [Fumadocs](https://fumadocs.vercel.app) and Next.js.
54

6-
Run development server:
5+
## Development
76

87
```bash
9-
npm run dev
10-
# or
11-
pnpm dev
12-
# or
13-
yarn dev
8+
# Install dependencies
9+
bun install
10+
11+
# Start development server
12+
bun run dev
13+
14+
# Build for production
15+
bun run build
1416
```
1517

16-
Open http://localhost:3000 with your browser to see the result.
18+
## Structure
1719

18-
## Explore
20+
```
21+
apps/docs/
22+
├── content/ # Documentation content (MDX files)
23+
│ └── docs/ # Main documentation pages
24+
├── src/
25+
│ ├── app/ # Next.js app directory
26+
│ │ ├── (home)/ # Home page layout
27+
│ │ └── docs/ # Documentation layout
28+
│ └── lib/ # Library code
29+
└── scripts/ # Build scripts
30+
```
1931

20-
In the project, you can see:
32+
## Adding Documentation
2133

22-
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23-
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
34+
1. Create MDX files in `content/docs/`
35+
2. Update navigation in `content/docs/meta.json` if needed
36+
3. Run `bun run dev` to preview changes
2437

25-
| Route | Description |
26-
| ------------------------- | ------------------------------------------------------ |
27-
| `app/(home)` | The route group for your landing page and other pages. |
28-
| `app/docs` | The documentation layout and pages. |
29-
| `app/api/search/route.ts` | The Route Handler for search. |
38+
## Configuration
3039

31-
### Fumadocs MDX
40+
- **Layout**: Site configuration in `src/lib/layout.shared.tsx`
41+
- **MDX**: MDX processing in `source.config.ts`
42+
- **Styling**: Global styles in `src/app/global.css` (Tailwind v4)
3243

33-
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
44+
## Technologies
3445

35-
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
46+
- **Framework**: Next.js 15 with App Router
47+
- **Documentation**: Fumadocs UI
48+
- **Styling**: Tailwind CSS v4
49+
- **MDX**: Fumadocs MDX with Shiki syntax highlighting
50+
- **Package Manager**: Bun
3651

37-
## Learn More
52+
## Using the Cards Component
3853

39-
To learn more about Next.js and Fumadocs, take a look at the following
40-
resources:
54+
For better documentation layout, use the `<Cards>` component for link grids:
55+
56+
```mdx
57+
<Cards>
58+
<Card
59+
title="Installation"
60+
description="Step-by-step guide to install Coda"
61+
href="/docs/installation"
62+
/>
63+
<Card
64+
title="Quick Start"
65+
description="Generate your first TypeScript client"
66+
href="/docs/quick-start"
67+
/>
68+
</Cards>
69+
```
70+
71+
## Learn More
4172

42-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43-
features and API.
44-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
73+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API
4574
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
75+
- [Coda Repository](https://github.com/macalinao/coda) - main Coda repository
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"title": "API Reference",
3-
"pages": ["index", "cli", "configuration", "visitors"]
3+
"pages": ["index", "clients"]
44
}

apps/docs/content/docs/index.mdx

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,25 @@ The generated code is built on [Codama](https://github.com/codama-idl/codama), t
2525

2626
## Where to start?
2727

28-
<div className="grid sm:grid-cols-2 gap-6 mt-8">
29-
<a
28+
<Cards>
29+
<Card
30+
title="Installation"
31+
description="Step-by-step guide to install Coda. Set up your local development environment."
3032
href="/docs/installation"
31-
className="group relative rounded-lg border border-border bg-card p-6 transition-colors hover:bg-accent"
32-
>
33-
<h3 className="font-semibold text-lg mb-2">Installation</h3>
34-
<p className="text-sm text-muted-foreground">
35-
Step-by-step guide to install Coda. Set up your local
36-
development environment.
37-
</p>
38-
</a>
39-
40-
<a
33+
/>
34+
<Card
35+
title="Quick Start"
36+
description="Generate your first TypeScript client from an Anchor IDL. No configuration required."
4137
href="/docs/quick-start"
42-
className="group relative rounded-lg border border-border bg-card p-6 transition-colors hover:bg-accent"
43-
>
44-
<h3 className="font-semibold text-lg mb-2">Quick Start</h3>
45-
<p className="text-sm text-muted-foreground">
46-
Generate your first TypeScript client from an Anchor IDL. No configuration
47-
required.
48-
</p>
49-
</a>
50-
</div>
51-
52-
<div className="grid sm:grid-cols-2 gap-6 mt-6">
53-
<a
38+
/>
39+
<Card
40+
title="Why Coda?"
41+
description="Learn how Coda simplifies Solana development."
5442
href="/docs/why-coda"
55-
className="group relative rounded-lg border border-border bg-card p-6 transition-colors hover:bg-accent"
56-
>
57-
<h3 className="font-semibold text-lg mb-2">Why Coda?</h3>
58-
<p className="text-sm text-muted-foreground">
59-
Learn how Coda simplifies Solana development.
60-
</p>
61-
</a>
62-
63-
<a
43+
/>
44+
<Card
45+
title="Configuration"
46+
description="Advanced configuration options for customizing code generation to your specific needs."
6447
href="/docs/configuration"
65-
className="group relative rounded-lg border border-border bg-card p-6 transition-colors hover:bg-accent"
66-
>
67-
<h3 className="font-semibold text-lg mb-2">Configuration</h3>
68-
<p className="text-sm text-muted-foreground">
69-
Advanced configuration options for customizing code generation to your
70-
specific needs.
71-
</p>
72-
</a>
73-
</div>
48+
/>
49+
</Cards>

apps/docs/content/docs/meta.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
22
"title": "Documentation",
3-
"pages": ["index", "installation", "configuration", "api", "...api/clients"]
3+
"pages": [
4+
"index",
5+
"installation",
6+
"quick-start",
7+
"why-coda",
8+
"configuration",
9+
"api"
10+
]
411
}

apps/docs/content/docs/test.mdx

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)