|
1 | 1 | # AGENTS.md - OpenZeppelin Docs Codebase Guide |
2 | 2 |
|
3 | 3 | ## Build/Lint/Test Commands |
4 | | -- `npm run build` - Build the Next.js application |
5 | | -- `npm run dev` - Start development server with turbo |
6 | | -- `npm run start` - Start production server |
7 | | -- `npm run postinstall` - Process MDX files with fumadocs-mdx |
| 4 | +- `bun run build` - Build the Next.js application |
| 5 | +- `bun run dev` - Start development server with turbo |
| 6 | +- `bun run start` - Start production server |
| 7 | +- `bun run postinstall` - Process MDX files with fumadocs-mdx |
8 | 8 | - No explicit lint/test commands configured - this is a documentation site |
9 | 9 |
|
| 10 | +## Navigation Management |
| 11 | +The site uses a **modular JSON navigation system** instead of fumadocs meta.json files: |
| 12 | + |
| 13 | +### Navigation Structure |
| 14 | +- `src/navigation/` - Modular navigation configuration |
| 15 | + - `types.ts` - TypeScript interfaces for navigation |
| 16 | + - `contracts.json` - All contract-related navigation |
| 17 | + - `tools.json` - Tools section navigation |
| 18 | + - `ecosystems.json` - Ecosystem-specific sections |
| 19 | + - `index.ts` - Combines all sections into navigationTree |
| 20 | + |
| 21 | +### Editing Navigation |
| 22 | +- **Add new pages**: Edit the relevant JSON file (contracts/tools/ecosystems) |
| 23 | +- **Reorder sections**: Modify array order in respective JSON files |
| 24 | +- **Add new sections**: Create new JSON file and import in `index.ts` |
| 25 | +- **Do NOT use meta.json files** - they have been removed and are not supported |
| 26 | + |
10 | 27 | ## Code Style Guidelines |
11 | 28 |
|
12 | 29 | ### TypeScript/JavaScript |
|
21 | 38 | - Documentation content in `content/` with nested version folders (v2.x, v3.x, etc.) |
22 | 39 | - Examples in `examples/` directory organized by feature |
23 | 40 | - Public assets in `public/` directory |
| 41 | +- Navigation config in `src/navigation/` directory |
24 | 42 |
|
25 | 43 | ### Naming Conventions |
26 | 44 | - PascalCase for React components and interfaces |
27 | 45 | - camelCase for variables and functions |
28 | | -- kebab-case for file names in content directories |
| 46 | +- kebab-case for file names in content directories |
0 commit comments