Technical Writer by daffy0208/ai-dev-standards
npx skills add https://github.com/daffy0208/ai-dev-standards --skill 'Technical Writer'优秀的文档是决定一个产品是被使用还是被放弃的关键。
为你的受众写作,而不是为你自己。
好的文档:
受众: 集成你 API 的开发者 目标: 无需支持即可完成集成
受众: 最终用户 目标: 帮助用户完成任务
受众: 学习者 目标: 通过实践教授概念
受众: 需要具体信息的开发者 目标: 快速查找参数、方法
受众: 维护系统的工程师 目标: 理解系统设计决策
# openapi.yaml
openapi: 3.0.0
info:
title: User API
version: 1.0.0
description: API for managing users
servers:
- url: https://api.example.com/v1
description: Production server
paths:
/users:
get:
summary: List all users
description: Returns a paginated list of users
parameters:
- name: page
in: query
description: Page number
schema:
type: integer
default: 1
- name: limit
in: query
description: Items per page
schema:
type: integer
default: 20
maximum: 100
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/User'
pagination:
$ref: '#/components/schemas/Pagination'
'401':
$ref: '#/components/responses/Unauthorized'
post:
summary: Create a user
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
- name
properties:
email:
type: string
format: email
example: john@example.com
name:
type: string
example: John Doe
responses:
'201':
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
$ref: '#/components/responses/BadRequest'
components:
schemas:
User:
type: object
properties:
id:
type: string
format: uuid
email:
type: string
format: email
name:
type: string
createdAt:
type: string
format: date-time
Pagination:
type: object
properties:
page:
type: integer
limit:
type: integer
total:
type: integer
responses:
Unauthorized:
description: Authentication required
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Unauthorized
BadRequest:
description: Invalid request
content:
application/json:
schema:
type: object
properties:
error:
type: string
details:
type: array
items:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- bearerAuth: []
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# User API
## 认证
所有 API 请求都需要使用 Bearer 令牌进行认证:
Authorization: Bearer YOUR_API_KEY
从 [仪表板](https://dashboard.example.com) 获取你的 API 密钥。
## 基础 URL
## 速率限制
- 每个 API 密钥每分钟 100 次请求
- 每个 API 密钥每小时 1000 次请求
速率限制头部:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 X-RateLimit-Reset: 1640000000
## 错误
标准 HTTP 状态码:
| 代码 | 含义 |
|------|---------|
| 200 | 成功 |
| 201 | 已创建 |
| 400 | 错误请求 - 参数无效 |
| 401 | 未授权 - 缺少或 API 密钥无效 |
| 403 | 禁止访问 - 权限不足 |
| 404 | 未找到 |
| 429 | 请求过多 - 超出速率限制 |
| 500 | 内部服务器错误 |
错误响应格式:
```json
{
"error": "Invalid email format",
"code": "VALIDATION_ERROR",
"details": {
"field": "email",
"message": "Must be a valid email address"
}
}
GET /users
返回分页的用户列表。
查询参数:
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| page | integer | 1 | 页码 |
| limit | integer | 20 | 每页项目数(最多 100) |
| sort | string | created_at | 排序字段 |
| order | string | desc | 排序顺序 (asc/desc) |
请求示例:
curl -X GET "https://api.example.com/v1/users?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
响应示例:
{
"data": [
{
"id": "usr_123",
"email": "john@example.com",
"name": "John Doe",
"createdAt": "2024-01-22T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"pages": 5
}
}
POST /users
创建一个新用户。
请求体:
{
"email": "john@example.com",
"name": "John Doe",
"role": "user"
}
参数:
| 字段 | 类型 | 必需 | 描述 |
|---|---|---|---|
| string | 是 | 用户电子邮件地址 | |
| name | string | 是 | 用户全名 |
| role | string | 否 | 用户角色(默认:user) |
请求示例:
curl -X POST "https://api.example.com/v1/users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"name": "John Doe"
}'
响应示例:
{
"id": "usr_123",
"email": "john@example.com",
"name": "John Doe",
"role": "user",
"createdAt": "2024-01-22T10:30:00Z"
}
npm install @example/api-client
import { ExampleAPI } from '@example/api-client'
const client = new ExampleAPI('YOUR_API_KEY')
// 列出用户
const users = await client.users.list({ page: 1, limit: 20 })
// 创建用户
const user = await client.users.create({
email: 'john@example.com',
name: 'John Doe'
})
pip install example-api
from example_api import Client
client = Client('YOUR_API_KEY')
# 列出用户
users = client.users.list(page=1, limit=20)
# 创建用户
user = client.users.create(
email='john@example.com',
name='John Doe'
)
通过 webhook 订阅事件:
{
"url": "https://yourdomain.com/webhook",
"events": ["user.created", "user.updated", "user.deleted"]
}
Webhook 负载:
{
"event": "user.created",
"timestamp": "2024-01-22T10:30:00Z",
"data": {
"id": "usr_123",
"email": "john@example.com"
}
}
sort 和 order 参数# 入门指南
## 你将学到什么
在本指南中,你将学习如何:
- 设置你的账户
- 创建你的第一个项目
- 邀请团队成员
- 部署到生产环境
**所需时间:** 15 分钟
## 先决条件
开始之前,请确保你拥有:
- [ ] 一个账户(在 example.com 注册)
- [ ] 已安装 Node.js 18+
- [ ] 基本的命令行知识
## 步骤 1:创建项目
1. 登录你的 [仪表板](https://dashboard.example.com)
2. 点击 **新建项目**
3. 输入你的项目名称
4. 选择一个区域(选择离你的用户最近的那个)
5. 点击 **创建**

**提示:** 免费计划最多可创建 5 个项目。
## 步骤 2:安装 CLI
打开你的终端并运行:
```bash
npm install -g @example/cli
验证安装:
example --version
你应该看到:example CLI v1.0.0
登录你的账户:
example login
这将打开你的浏览器。点击 授权 以继续。
导航到你的应用目录:
cd my-app
部署:
example deploy
你的应用将上线,地址为 https://your-app.example.com
解决方案: 确保 npm 的全局 bin 目录在你的 PATH 中。
运行:
npm config get prefix
将 /bin 添加到你的 PATH。
解决方案:
example logoutexample login
---
## 第三阶段:教程
### 教程结构
```markdown
# 使用 Example 框架构建待办事项应用
## 你将构建什么
在本教程中,你将构建一个功能齐全的待办事项应用,包含:
- ✅ 添加、编辑和删除待办事项
- ✅ 标记待办事项为完成
- ✅ 按状态筛选
- ✅ 将数据持久化到数据库
**最终结果:** [在线演示](https://todo-demo.example.com)
## 先决条件
- Node.js 18+
- 基本的 JavaScript 知识
- 30 分钟
## 步骤 1:设置项目
创建一个新项目:
```bash
npx create-example-app my-todo-app
cd my-todo-app
npm install
启动开发服务器:
npm run dev
打开 http://localhost:3000。你应该会看到一个欢迎页面。
创建 components/Todo.jsx:
export function Todo({ todo, onToggle, onDelete }) {
return (
<div className="todo">
<input type="checkbox" checked={todo.completed} onChange={() => onToggle(todo.id)} />
<span className={todo.completed ? 'completed' : ''}>{todo.text}</span>
<button onClick={() => onDelete(todo.id)}>Delete</button>
</div>
)
}
这里发生了什么:
onToggle 将待办事项标记为完成/未完成onDelete 删除待办事项completed 为已完成的待办事项添加样式创建 components/TodoList.jsx:
import { useState } from 'react'
import { Todo } from './Todo'
export function TodoList() {
const [todos, setTodos] = useState([])
const [newTodo, setNewTodo] = useState('')
const addTodo = () => {
if (!newTodo.trim()) return
setTodos([
...todos,
{
id: Date.now(),
text: newTodo,
completed: false
}
])
setNewTodo('')
}
const toggleTodo = id => {
setTodos(todos.map(todo => (todo.id === id ? { ...todo, completed: !todo.completed } : todo)))
}
const deleteTodo = id => {
setTodos(todos.filter(todo => todo.id !== id))
}
return (
<div>
<h1>My Todos</h1>
<div className="add-todo">
<input
value={newTodo}
onChange={e => setNewTodo(e.target.value)}
placeholder="What needs to be done?"
onKeyPress={e => e.key === 'Enter' && addTodo()}
/>
<button onClick={addTodo}>Add</button>
</div>
<div className="todo-list">
{todos.map(todo => (
<Todo key={todo.id} todo={todo} onToggle={toggleTodo} onDelete={deleteTodo} />
))}
</div>
</div>
)
}
关键概念:
useState 管理待办事项列表map 渲染每个待办事项filter 移除已删除的待办事项更新 TodoList.jsx:
const [filter, setFilter] = useState('all') // 'all', 'active', 'completed'
const filteredTodos = todos.filter(todo => {
if (filter === 'active') return !todo.completed
if (filter === 'completed') return todo.completed
return true
})
// 在 JSX 中:
<div className="filters">
<button onClick={() => setFilter('all')}>All</button>
<button onClick={() => setFilter('active')}>Active</button>
<button onClick={() => setFilter('completed')}>Completed</button>
</div>
<div className="todo-list">
{filteredTodos.map(todo => (
<Todo key={todo.id} todo={todo} onToggle={toggleTodo} onDelete={deleteTodo} />
))}
</div>
安装 Prisma:
npm install @prisma/client
npm install -D prisma
npx prisma init
在 prisma/schema.prisma 中定义模式:
model Todo {
id String @id @default(uuid())
text String
completed Boolean @default(false)
createdAt DateTime @default(now())
}
运行迁移:
npx prisma migrate dev --name init
创建 API 路由 app/api/todos/route.ts:
import { prisma } from '@/lib/db'
export async function GET() {
const todos = await prisma.todo.findMany()
return Response.json(todos)
}
export async function POST(request: Request) {
const { text } = await request.json()
const todo = await prisma.todo.create({
data: { text }
})
return Response.json(todo)
}
更新 TodoList.jsx 以使用 API:
useEffect(() => {
fetch('/api/todos')
.then(res => res.json())
.then(data => setTodos(data))
}, [])
const addTodo = async () => {
if (!newTodo.trim()) return
const response = await fetch('/api/todos', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text: newTodo })
})
const todo = await response.json()
setTodos([...todos, todo])
setNewTodo('')
}
---
## 第四阶段:参考文档
### 组件文档
```markdown
# Button 组件
## 导入
```typescript
import { Button } from '@/components/Button'
<Button variant="primary" size="md" onClick={handleClick}>
Click me
</Button>
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| children | ReactNode | 必需 | 按钮内容 |
| variant | 'primary' | 'secondary' | 'danger' |
| size | 'sm' | 'md' | 'lg' |
| onClick | () => void | - | 点击处理器 |
| disabled | boolean | false | 禁用状态 |
| loading | boolean | false | 显示加载旋转器 |
| type | 'button' | 'submit' | 'reset' |
| fullWidth | boolean | false | 全宽按钮 |
<Button variant="primary">Save</Button>
<Button variant="secondary">Cancel</Button>
<Button variant="danger" onClick={handleDelete}>
Delete
</Button>
<Button loading disabled>
Processing...
</Button>
<Button fullWidth>Submit</Button>
<button> 元素
---
## 文档工具
### Docusaurus(推荐)
```bash
npx create-docusaurus@latest my-docs classic
cd my-docs
npm start
结构:
my-docs/
├── docs/ # 文档 Markdown 文件
│ ├── intro.md
│ ├── api/
│ └── guides/
├── blog/ # 博客文章
├── src/
│ └── pages/ # 自定义 React 页面
├── static/ # 图片、资源
├── docusaurus.config.js
└── sidebars.js # 侧边栏导航
使用主动语态:
✅ "点击按钮保存"
❌ "按钮应被点击以保存"
简洁明了:
✅ "返回用户数据"
❌ "此端点将返回与用户关联的数据"
使用示例:
✅ "将 `timeout` 设置为 5000(5 秒)"
❌ "设置超时参数"
拆分长内容:
✅ 使用标题、列表、代码块
❌ 大段文字
包含错误处理:
✅ 展示常见错误和解决方案
❌ 只展示理想路径
技能:
api-designer - API 文档frontend-builder - 组件文档ux-designer - 用户指南工具:
优秀的文档 = 快乐的开发者 = 成功的产品。 📖
每周安装数
0
仓库
GitHub 星标数
18
首次出现
Jan 1, 1970
安全审计
Great documentation is the difference between a product people use and a product people abandon.
Write for your audience, not yourself.
Good documentation:
Audience: Developers integrating your API Goal: Enable integration without support
Audience: End users Goal: Help users accomplish tasks
Audience: Learners Goal: Teach concepts through practice
Audience: Developers needing specifics Goal: Quick lookup of parameters, methods
Audience: Engineers maintaining system Goal: Understand system design decisions
# openapi.yaml
openapi: 3.0.0
info:
title: User API
version: 1.0.0
description: API for managing users
servers:
- url: https://api.example.com/v1
description: Production server
paths:
/users:
get:
summary: List all users
description: Returns a paginated list of users
parameters:
- name: page
in: query
description: Page number
schema:
type: integer
default: 1
- name: limit
in: query
description: Items per page
schema:
type: integer
default: 20
maximum: 100
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/User'
pagination:
$ref: '#/components/schemas/Pagination'
'401':
$ref: '#/components/responses/Unauthorized'
post:
summary: Create a user
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
- name
properties:
email:
type: string
format: email
example: john@example.com
name:
type: string
example: John Doe
responses:
'201':
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
$ref: '#/components/responses/BadRequest'
components:
schemas:
User:
type: object
properties:
id:
type: string
format: uuid
email:
type: string
format: email
name:
type: string
createdAt:
type: string
format: date-time
Pagination:
type: object
properties:
page:
type: integer
limit:
type: integer
total:
type: integer
responses:
Unauthorized:
description: Authentication required
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Unauthorized
BadRequest:
description: Invalid request
content:
application/json:
schema:
type: object
properties:
error:
type: string
details:
type: array
items:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- bearerAuth: []
# User API
## Authentication
All API requests require authentication using a Bearer token:
Authorization: Bearer YOUR_API_KEY
Get your API key from the [dashboard](https://dashboard.example.com).
## Base URL
## Rate Limiting
- 100 requests per minute per API key
- 1000 requests per hour per API key
Rate limit headers:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99 X-RateLimit-Reset: 1640000000
## Errors
Standard HTTP status codes:
| Code | Meaning |
|------|---------|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Error response format:
```json
{
"error": "Invalid email format",
"code": "VALIDATION_ERROR",
"details": {
"field": "email",
"message": "Must be a valid email address"
}
}
GET /users
Returns a paginated list of users.
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | integer | 1 | Page number |
| limit | integer | 20 | Items per page (max 100) |
| sort | string | created_at | Sort field |
| order | string | desc | Sort order (asc/desc) |
Example Request:
curl -X GET "https://api.example.com/v1/users?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
"data": [
{
"id": "usr_123",
"email": "john@example.com",
"name": "John Doe",
"createdAt": "2024-01-22T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"pages": 5
}
}
POST /users
Creates a new user.
Request Body:
{
"email": "john@example.com",
"name": "John Doe",
"role": "user"
}
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | User email address | |
| name | string | Yes | User full name |
| role | string | No | User role (default: user) |
Example Request:
curl -X POST "https://api.example.com/v1/users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"name": "John Doe"
}'
Example Response:
{
"id": "usr_123",
"email": "john@example.com",
"name": "John Doe",
"role": "user",
"createdAt": "2024-01-22T10:30:00Z"
}
npm install @example/api-client
import { ExampleAPI } from '@example/api-client'
const client = new ExampleAPI('YOUR_API_KEY')
// List users
const users = await client.users.list({ page: 1, limit: 20 })
// Create user
const user = await client.users.create({
email: 'john@example.com',
name: 'John Doe'
})
pip install example-api
from example_api import Client
client = Client('YOUR_API_KEY')
# List users
users = client.users.list(page=1, limit=20)
# Create user
user = client.users.create(
email='john@example.com',
name='John Doe'
)
Subscribe to events via webhooks:
{
"url": "https://yourdomain.com/webhook",
"events": ["user.created", "user.updated", "user.deleted"]
}
Webhook payload:
{
"event": "user.created",
"timestamp": "2024-01-22T10:30:00Z",
"data": {
"id": "usr_123",
"email": "john@example.com"
}
}
sort and order parameters to list endpointsInitial release
# Getting Started Guide
## What You'll Learn
In this guide, you'll learn how to:
- Set up your account
- Create your first project
- Invite team members
- Deploy to production
**Time required:** 15 minutes
## Prerequisites
Before you begin, make sure you have:
- [ ] An account (sign up at example.com)
- [ ] Node.js 18+ installed
- [ ] Basic command line knowledge
## Step 1: Create a Project
1. Log in to your [dashboard](https://dashboard.example.com)
2. Click **New Project**
3. Enter your project name
4. Select a region (choose the one closest to your users)
5. Click **Create**

**Tip:** You can create up to 5 projects on the free plan.
## Step 2: Install the CLI
Open your terminal and run:
```bash
npm install -g @example/cli
Verify installation:
example --version
You should see: example CLI v1.0.0
Log in to your account:
example login
This will open your browser. Click Authorize to continue.
Navigate to your app directory:
cd my-app
Deploy:
example deploy
Your app will be live at https://your-app.example.com
Solution: Make sure npm's global bin directory is in your PATH.
Run:
npm config get prefix
Add /bin to your PATH.
Solution:
example logoutexample login# Build a Todo App with Example Framework
## What You'll Build
In this tutorial, you'll build a fully functional todo app with:
- ✅ Add, edit, and delete todos
- ✅ Mark todos as complete
- ✅ Filter by status
- ✅ Persist data to database
**Final result:** [Live Demo](https://todo-demo.example.com)
## Prerequisites
- Node.js 18+
- Basic JavaScript knowledge
- 30 minutes
## Step 1: Set Up Project
Create a new project:
```bash
npx create-example-app my-todo-app
cd my-todo-app
npm install
Start the dev server:
npm run dev
Open http://localhost:3000. You should see a welcome page.
Create components/Todo.jsx:
export function Todo({ todo, onToggle, onDelete }) {
return (
<div className="todo">
<input type="checkbox" checked={todo.completed} onChange={() => onToggle(todo.id)} />
<span className={todo.completed ? 'completed' : ''}>{todo.text}</span>
<button onClick={() => onDelete(todo.id)}>Delete</button>
</div>
)
}
What's happening here:
onToggle marks the todo as complete/incompleteonDelete removes the todocompleted styles finished todosCreate components/TodoList.jsx:
import { useState } from 'react'
import { Todo } from './Todo'
export function TodoList() {
const [todos, setTodos] = useState([])
const [newTodo, setNewTodo] = useState('')
const addTodo = () => {
if (!newTodo.trim()) return
setTodos([
...todos,
{
id: Date.now(),
text: newTodo,
completed: false
}
])
setNewTodo('')
}
const toggleTodo = id => {
setTodos(todos.map(todo => (todo.id === id ? { ...todo, completed: !todo.completed } : todo)))
}
const deleteTodo = id => {
setTodos(todos.filter(todo => todo.id !== id))
}
return (
<div>
<h1>My Todos</h1>
<div className="add-todo">
<input
value={newTodo}
onChange={e => setNewTodo(e.target.value)}
placeholder="What needs to be done?"
onKeyPress={e => e.key === 'Enter' && addTodo()}
/>
<button onClick={addTodo}>Add</button>
</div>
<div className="todo-list">
{todos.map(todo => (
<Todo key={todo.id} todo={todo} onToggle={toggleTodo} onDelete={deleteTodo} />
))}
</div>
</div>
)
}
Key concepts:
useState manages the list of todosmap renders each todofilter removes deleted todosUpdate TodoList.jsx:
const [filter, setFilter] = useState('all') // 'all', 'active', 'completed'
const filteredTodos = todos.filter(todo => {
if (filter === 'active') return !todo.completed
if (filter === 'completed') return todo.completed
return true
})
// In JSX:
<div className="filters">
<button onClick={() => setFilter('all')}>All</button>
<button onClick={() => setFilter('active')}>Active</button>
<button onClick={() => setFilter('completed')}>Completed</button>
</div>
<div className="todo-list">
{filteredTodos.map(todo => (
<Todo key={todo.id} todo={todo} onToggle={toggleTodo} onDelete={deleteTodo} />
))}
</div>
Install Prisma:
npm install @prisma/client
npm install -D prisma
npx prisma init
Define schema in prisma/schema.prisma:
model Todo {
id String @id @default(uuid())
text String
completed Boolean @default(false)
createdAt DateTime @default(now())
}
Run migration:
npx prisma migrate dev --name init
Create API route app/api/todos/route.ts:
import { prisma } from '@/lib/db'
export async function GET() {
const todos = await prisma.todo.findMany()
return Response.json(todos)
}
export async function POST(request: Request) {
const { text } = await request.json()
const todo = await prisma.todo.create({
data: { text }
})
return Response.json(todo)
}
Update TodoList.jsx to use API:
useEffect(() => {
fetch('/api/todos')
.then(res => res.json())
.then(data => setTodos(data))
}, [])
const addTodo = async () => {
if (!newTodo.trim()) return
const response = await fetch('/api/todos', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text: newTodo })
})
const todo = await response.json()
setTodos([...todos, todo])
setNewTodo('')
}
---
## Phase 4: Reference Documentation
### Component Documentation
```markdown
# Button Component
## Import
```typescript
import { Button } from '@/components/Button'
<Button variant="primary" size="md" onClick={handleClick}>
Click me
</Button>
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | required | Button content |
| variant | 'primary' | 'secondary' | 'danger' |
| size | 'sm' | 'md' | 'lg' |
| onClick | () => void | - | Click handler |
| disabled | boolean | false | Disabled state |
| loading | boolean | false | Shows loading spinner |
| type | 'button' | 'submit' | 'reset' |
| fullWidth |
<Button variant="primary">Save</Button>
<Button variant="secondary">Cancel</Button>
<Button variant="danger" onClick={handleDelete}>
Delete
</Button>
<Button loading disabled>
Processing...
</Button>
<Button fullWidth>Submit</Button>
<button> elementnpx create-docusaurus@latest my-docs classic
cd my-docs
npm start
Structure:
my-docs/
├── docs/ # Documentation markdown files
│ ├── intro.md
│ ├── api/
│ └── guides/
├── blog/ # Blog posts
├── src/
│ └── pages/ # Custom React pages
├── static/ # Images, assets
├── docusaurus.config.js
└── sidebars.js # Sidebar navigation
Use Active Voice:
✅ "Click the button to save"
❌ "The button should be clicked to save"
Be Concise:
✅ "Returns user data"
❌ "This endpoint will return the data associated with the user"
Use Examples:
✅ "Set `timeout` to 5000 (5 seconds)"
❌ "Set the timeout parameter"
Break Up Long Content:
✅ Use headings, lists, code blocks
❌ Long paragraphs of text
Include Error Handling:
✅ Show common errors and solutions
❌ Only show happy path
Skills:
api-designer - API documentationfrontend-builder - Component documentationux-designer - User guidesTools:
Great docs = happy developers = successful product. 📖
Weekly Installs
0
Repository
GitHub Stars
18
First Seen
Jan 1, 1970
Security Audits
lark-cli 共享规则:飞书资源操作指南与权限配置详解
24,000 周安装
| boolean |
| false |
| Full width button |