|
1 | 1 | # Base Documentation |
2 | 2 |
|
3 | | -Technical documentation for Base, an Ethereum L2 blockchain. Built with Mintlify. |
| 3 | +Technical documentation for Base (Ethereum L2). Built with Mintlify. |
4 | 4 |
|
5 | | -## Quick Reference |
| 5 | +## Commands |
6 | 6 |
|
7 | 7 | | Command | Description | |
8 | 8 | |---------|-------------| |
9 | | -| `mintlify dev` | Local dev server (http://localhost:3000) | |
10 | | -| `mintlify install` | Reinstall dependencies | |
11 | | -| `node scripts/lint-mdx.js` | Lint MDX files (deterministic) | |
12 | | -| `/lint` | Run linter and get help fixing issues | |
13 | | -| `/doc-feedback` | Review docs for quality and style guide adherence | |
| 9 | +| `mintlify dev` | Local dev server | |
| 10 | +| `/lint` | Lint MDX files and fix issues | |
| 11 | +| `/doc-feedback` | Review content quality | |
14 | 12 |
|
15 | | -## Repository Structure |
| 13 | +## Structure |
16 | 14 |
|
17 | 15 | ``` |
18 | | -docs/ # All documentation content (MDX files) |
19 | | -├── get-started/ # Introduction, quickstarts, builder support |
20 | | -├── base-chain/ # Network info, node operations, tools |
21 | | -├── base-account/ # Smart Wallet, account abstraction |
22 | | -├── base-app/ # Agents, app development |
23 | | -├── mini-apps/ # Mini app development guides |
24 | | -├── onchainkit/ # React component library (versioned) |
25 | | -├── cookbook/ # Use-case tutorials |
26 | | -├── learn/ # Educational content (Solidity, Ethereum) |
27 | | -├── images/ # Assets organized by topic |
28 | | -├── snippets/ # Reusable MDX components |
29 | | -└── docs.json # Navigation and site configuration |
30 | | -storybook/ # Component demos (Chromatic deployment) |
| 16 | +docs/ |
| 17 | +├── get-started/ # Intro, quickstarts |
| 18 | +├── base-chain/ # Network, nodes, tools |
| 19 | +├── base-account/ # Smart Wallet SDK |
| 20 | +├── base-app/ # Agent development |
| 21 | +├── mini-apps/ # MiniKit guides |
| 22 | +├── onchainkit/ # React components (versioned) |
| 23 | +├── cookbook/ # Tutorials |
| 24 | +├── learn/ # Solidity, Ethereum basics |
| 25 | +├── images/ # Assets by topic |
| 26 | +├── snippets/ # Reusable MDX components |
| 27 | +└── docs.json # Navigation config |
31 | 28 | ``` |
32 | 29 |
|
33 | | -## Documentation Sections |
34 | | - |
35 | | -| Section | Path | Content Type | |
36 | | -|---------|------|--------------| |
37 | | -| Get Started | `get-started/` | Intro, quickstarts, AI prompting | |
38 | | -| Base Chain | `base-chain/` | Network, nodes, tools, security | |
39 | | -| Base Account | `base-account/` | Smart Wallet SDK, integrations | |
40 | | -| Base App | `base-app/` | Agent development | |
41 | | -| Mini Apps | `mini-apps/` | Mini app guides, MiniKit | |
42 | | -| OnchainKit | `onchainkit/` | React components (versioned) | |
43 | | -| Cookbook | `cookbook/` | Practical tutorials | |
44 | | -| Learn | `learn/` | Solidity, Ethereum fundamentals | |
45 | | - |
46 | | -## Content Standards |
47 | | - |
48 | | -### File Format |
49 | | - |
50 | | -Every MDX file requires frontmatter: |
| 30 | +## Content Rules |
51 | 31 |
|
| 32 | +**Frontmatter** (required): |
52 | 33 | ```yaml |
53 | 34 | --- |
54 | | -title: "Clear, keyword-rich title" |
55 | | -description: "Concise value description" |
| 35 | +title: "Keyword-rich title" |
| 36 | +description: "Value description" |
56 | 37 | --- |
57 | 38 | ``` |
58 | 39 |
|
59 | | -### Writing Rules |
60 | | - |
61 | | -- American English spelling |
62 | | -- Sentence case for headings |
63 | | -- Second person ("you") for instructions |
64 | | -- Active voice, present tense |
65 | | -- No H1 in body (title comes from frontmatter) |
66 | | - |
67 | | -### Code Blocks |
68 | | - |
69 | | -- Always specify language: ` ```typescript ` not ` ``` ` |
70 | | -- Add filename or title: ` ```typescript page.tsx ` or ` ```typescript title="Example" ` |
71 | | -- Blocks >7 lines: add `lines` for line numbers |
72 | | -- Use `highlight={1-2,5}` for emphasis |
73 | | -- Use `wrap` to prevent horizontal scroll |
74 | | - |
75 | | -### Components |
76 | | - |
77 | | -Use sparingly and correctly: |
| 40 | +**Writing**: American English, sentence case headings, second person ("you"), active voice. |
78 | 41 |
|
79 | | -**Callouts** (for important info only): |
80 | | -- `<Note>` - supplementary info |
81 | | -- `<Tip>` - best practices |
82 | | -- `<Warning>` - critical cautions |
83 | | -- `<Info>` - neutral context |
84 | | -- `<Check>` - success confirmation |
| 42 | +**Code blocks**: Always specify language. Add filename or title. Use `highlight={}` for emphasis. |
85 | 43 |
|
86 | | -**Structure**: |
87 | | -- `<Steps>` with `<Step title="...">` - procedures |
88 | | -- `<Tabs>` with `<Tab title="...">` - platform-specific content |
89 | | -- `<CodeGroup>` - same concept in multiple languages |
90 | | -- `<AccordionGroup>` with `<Accordion title="...">` - progressive disclosure |
| 44 | +**Components**: See [mintlify-reference.md](mintlify-reference.md) for syntax. |
91 | 45 |
|
92 | | -**Media**: |
93 | | -- All images wrapped in `<Frame>` |
94 | | -- `<img>` must have `alt` attribute |
95 | | - |
96 | | -**API Docs**: |
97 | | -- `<ParamField path|body|query|header="..." type="...">` - parameters |
98 | | -- `<ResponseField name="..." type="...">` - responses |
99 | | - |
100 | | -### Comments |
101 | | - |
102 | | -Use MDX syntax, not HTML: |
103 | | -```mdx |
104 | | -{/* Correct */} |
105 | | -<!-- Wrong --> |
106 | | -``` |
| 46 | +**Images**: Wrap in `<Frame>`, include `alt` attribute. |
107 | 47 |
|
108 | 48 | ## Navigation |
109 | 49 |
|
110 | | -All navigation is defined in `docs.json`: |
111 | | - |
112 | | -- **Tabs**: Top-level sections (Get Started, Base Chain, etc.) |
113 | | -- **Groups**: Subsections within tabs |
114 | | -- **Pages**: Individual MDX files |
115 | | - |
116 | | -When adding pages: |
117 | | -1. Create MDX file in appropriate directory |
118 | | -2. Add path to `docs.json` in correct group |
119 | | - |
120 | | -When removing pages: |
121 | | -1. Delete MDX file |
122 | | -2. Remove from `docs.json` |
123 | | -3. Add redirect in `docs.json` redirects section |
124 | | - |
125 | | -## Git |
126 | | - |
127 | | -- **Primary branch**: `master` |
128 | | -- **Auto-deploy**: Mintlify GitHub App deploys on push to master |
| 50 | +Edit `docs.json` to add/remove pages. Add redirects when removing pages. |
129 | 51 |
|
130 | | -## Key Reference Files |
| 52 | +## References |
131 | 53 |
|
132 | 54 | | File | Purpose | |
133 | 55 | |------|---------| |
134 | | -| `docs.json` | Site navigation and config | |
135 | | -| `content-instructions.md` | Detailed writing guidelines | |
136 | | -| `mintlify-reference.md` | Component syntax reference | |
137 | | -| `scripts/lint-mdx.js` | Deterministic MDX linter | |
| 56 | +| [content-instructions.md](content-instructions.md) | Writing guidelines | |
| 57 | +| [mintlify-reference.md](mintlify-reference.md) | Component syntax | |
| 58 | +| [scripts/README.md](scripts/README.md) | Linter usage | |
138 | 59 |
|
139 | 60 | ## Before Committing |
140 | 61 |
|
141 | | -1. Run `/lint` and fix any errors |
142 | | -2. If removing docs, add redirects in `docs.json` |
143 | | -3. Verify internal links work |
| 62 | +1. Run `/lint` and fix errors |
| 63 | +2. Add redirects for removed pages |
| 64 | +3. Verify links work |
0 commit comments