|
1 | | -# coda-docs |
| 1 | +# Coda Documentation |
2 | 2 |
|
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. |
5 | 4 |
|
6 | | -Run development server: |
| 5 | +## Development |
7 | 6 |
|
8 | 7 | ```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 |
14 | 16 | ``` |
15 | 17 |
|
16 | | -Open http://localhost:3000 with your browser to see the result. |
| 18 | +## Structure |
17 | 19 |
|
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 | +``` |
19 | 31 |
|
20 | | -In the project, you can see: |
| 32 | +## Adding Documentation |
21 | 33 |
|
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 |
24 | 37 |
|
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 |
30 | 39 |
|
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) |
32 | 43 |
|
33 | | -A `source.config.ts` config file has been included, you can customise different options like frontmatter schema. |
| 44 | +## Technologies |
34 | 45 |
|
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 |
36 | 51 |
|
37 | | -## Learn More |
| 52 | +## Using the Cards Component |
38 | 53 |
|
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 |
41 | 72 |
|
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 |
45 | 74 | - [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs |
| 75 | +- [Coda Repository](https://github.com/macalinao/coda) - main Coda repository |
0 commit comments