跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。

关于这个模板

产品文档网站是一个以指南为先的技术文档模板,专为开发者 SDK、API 和软件平台打造。它实现了经典的三栏阅读体验:左侧是可折叠的导航栏,能跟踪当前所在章节;中间是专注的文档正文栏;右侧是“本页内容”目录,滚动时会高亮当前标题。内容存放在 18+ 个本地 Markdown 文件中,按逻辑分成多个指南组,团队添加或编辑页面时无需改动 React 组件。开箱即用的开发者友好功能包括:v2 / v3 版本切换器,能真正切换正文、端点和参数表;整页同步的 JavaScript、Python 和 cURL 代码标签页,带一键复制按钮;样式化的提示块(note、tip、warning、danger);带编号的步骤列表;结构化的参数表;以及交互式“Try it”请求运行器,会返回逼真的模拟 JSON 数据。Cmd+K 搜索面板会索引每个文档标题,支持完整的键盘导航;此外还有上一页/下一页链接、编辑此页链接、本地点“此页是否有帮助?”反馈、带版本号的更新日志,以及一个实用的 404 路由,共同构成完整的外壳。整体采用清爽的纸白、石墨色(#1C1E26)、紫外色(#6C4CFF)和青柠色代码高亮(#C3F53C),并配有深色模式切换,站点能平滑适配移动端抽屉布局,变量可随时替换以适配任何 SDK 品牌。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Product Documentation Website

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build a guides-first, three-column developer SDK documentation website for [BRAND] (`[PKG_NAME]`), backed by 18+ local Markdown files bundled directly into the static build. Includes a working v2/v3 version switcher, page-wide synchronized JavaScript/Python/cURL code tabs, an interactive 'Try it' request playground, Cmd+K heading search, scroll-tracked right table of contents, local helpfulness feedback, changelog, and a custom 404 page.

- Audience: Software engineers, developer-experience leads, and technical writers shipping SDK guides and API references.
- Goal: Give visitors an authoritative, fast-scanning documentation site that opens directly on a rich Quickstart guide with live code tabs, steps, callouts, and an interactive request panel right on the first screen.
- Tone: Clear, direct, engineering-first technical writing with concrete payloads, crisp parameter definitions, and zero marketing filler.

## Stack
- Framework: Vite 6 + React 18 + TypeScript
- Styling: Tailwind CSS 4
- Libraries: lucide-react (ISC), @fontsource/plus-jakarta-sans (OFL-1.1), @fontsource/inter (OFL-1.1), @fontsource/jetbrains-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Set base: './' and build: { sourcemap: false } in vite.config.ts.
  - Import @fontsource/plus-jakarta-sans (600, 700, 800), @fontsource/inter (400, 500, 600), and @fontsource/jetbrains-mono (400, 500, 600) in src/main.tsx.
  - Store 18+ real Markdown documentation pages under src/content/docs/*.md and import them statically via import.meta.glob('./content/docs/*.md', { query: '?raw', import: 'default', eager: true }).
  - Parse Markdown front matter, headings, callout blocks (:::note, :::tip, :::warning, :::danger), numbered steps, parameter tables, and synced code-tab groups in src/utils/docParser.ts.
  - Persist preferred code language, active SDK version (v3/v2), color theme (light/dark), and 'Was this page helpful?' votes in src/data/docStorage.ts.

## Variables
- [BRAND] — SDK Brand Name (default: "RelayMesh"). Fictional developer SDK product name
- [PKG_NAME] — Package Slug (default: "relaymesh"). Lowercase npm/pip package and CLI slug
- [API_BASE] — Mock API Base URL (default: "https://api.relaymesh.dev"). Fictional endpoint URL shown in cURL and Try It panels
- [TAGLINE] — SDK One-Line Summary (default: "Low-latency event routing, signed webhooks, and fan-out delivery for modern services."). Short technical subtitle for the intro banner
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/product-documentation-website in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

## Design
### Colors
- Paper White `#FFFFFF` — Primary light-mode reading canvas and header surface
- Soft Rail `#F6F7FB` — Sidebar surface, table headers, and callout fills in light mode
- Graphite Ink `#1C1E26` — Primary text in light mode and dark code-block / dark-mode base surface
- Deep Obsidian `#12141B` — Dark-mode page background with #1C1E26 cards and #F2F4F8 foreground text
- Ultraviolet Accent `#6C4CFF` — Active sidebar item, TOC scroll indicator, primary buttons, and interactive links (lightened to #9B85FF in dark mode for AA contrast)
- Lime Highlight `#C3F53C` — Code syntax highlights, HTTP 200 status badge inside dark graphite code frames, and active code-tab underline
- Amber Caution `#F59E0B` — Warning callouts and v2 deprecation notice pills
- Crimson Alert `#E5484D` — Danger callouts and error status codes

### Typography
- Headings & Display: Plus Jakarta Sans (OFL), weights 600/700/800
- Body Prose & UI: Inter (OFL), weights 400/500/600
- Code, Endpoints & Tables: JetBrains Mono (OFL), weights 400/500/600

### Layout & motion
- Spacing: Crisp editorial reading grid: 60px sticky top bar, 260px left sidebar, 760px optimal-measure central reading column, 220px right 'On this page' TOC on desktop (1440px); 24px–32px section gaps.
- Radius: 6px for badges, buttons, and search inputs; 10px for dark graphite code frames, callouts, and interactive Try It panels.
- Motion: Smooth 150ms active-indicator glide on sidebar links, synced code tabs, and right-hand TOC highlight.
- Motion: Crisp 160ms expand/collapse on sidebar groups and Cmd+K search modal fade.
- Motion: Respect prefers-reduced-motion across all transitions and smooth-scroll jumps.
- Imagery: Pure code-drawn technical graphics: geometric ultraviolet/lime SVG logo mark for [BRAND], inline SVG request-pipeline architecture diagram on the Quickstart page, crisp Lucide icons for callouts and controls, and high-contrast dark graphite code frames with lime highlights. No external photos.

## Pages & Sections
### Quickstart · [BRAND] Docs (`#/docs/quickstart`)
1. **Top Documentation Bar & Three-Column Shell** — Sticky 60px top header with custom geometric SVG mark + [BRAND] Docs wordmark, top-level links (Guides, API Reference, Changelog, 404 Demo), live Version Switcher dropdown ('v3 (Latest)' / 'v2 (Legacy)' — switching genuinely updates page prose, code examples, endpoint paths `/v3/events` vs `/v2/dispatch`, and shows an Amber v2 notice banner), Cmd+K search trigger button, and Light/Dark theme toggle. Left 260px sidebar lists 5 collapsible groups covering 18+ seeded Markdown pages: Getting Started (Quickstart, Installation, Authentication, Configuration), Core Concepts (Event Routing, Signed Webhooks, Retry Policies, Dead-Letter Queues, Idempotency), SDK Guides (Batch Publishing, Stream Consumers, Edge Middleware, Local Testing), API Reference (Publish Event, Manage Routes, Inspect Deliveries, Webhook Endpoints), and Operations (Rate Limits & Quotas, Error Codes). Right 220px column renders the sticky 'On this page' TOC tracking the reader's scroll position with an Ultraviolet left rail.
   Layout: Three-column CSS grid (`260px minmax(0,1fr) 220px`) inside a 1400px container. Below 1180px the right TOC hides; below 900px the left sidebar collapses into a slide-out 'Docs menu' drawer.
   Motion: Active TOC heading highlights automatically via scroll position listener.
2. **Guides-First Quickstart Article, Synced Code Tabs & Interactive Try It Panel** — Opens with a vibrant Graphite + Ultraviolet + Lime hero strip displaying the SDK badge (`[PKG_NAME] v3.4`), Quickstart headline, [TAGLINE], and an inline SVG architecture flow (`Producer -> Edge Router -> Signed Fan-out -> Retry Queue`). Follows with numbered Steps (1. Install `[PKG_NAME]`, 2. Initialize client, 3. Publish & verify an event) using synchronized language tabs (JavaScript, Python, cURL—clicking Python switches every multi-language code block on the page at once and persists to localStorage) inside dark `#1C1E26` frames with `#C3F53C` lime accent lines and one-click Copy buttons. Includes all four styled Callouts (Note, Tip, Warning, Danger), a structured Parameter Table (name, type, required pill, description), and an interactive 'Try it' Request Panel where users edit JSON payload fields (`topic`, `region`, `idempotencyKey`), pick HTTP method/endpoint, and click 'Send mock request' to receive a realistic mocked JSON response with HTTP 202 status badge and simulated latency readout.
   Layout: Single centered reading column (max 760px) with full-width code blocks, responsive parameter tables inside `overflow-x-auto` frames, and a two-pane Request / Response layout inside the Try It widget.
3. **Page Footer: Helpful Vote, Edit Link & Prev / Next Navigation** — Bottom bar with 'Was this page helpful?' Yes / No buttons persisted per page in localStorage (showing a thank-you confirmation once voted), an 'Edit this page on Git' link pointing to the page's Markdown path (e.g. `src/content/docs/quickstart.md`), side-by-side Previous / Next page cards, and a subtle footer carrying the optional [CREDIT] link.
   Layout: Two-column prev/next cards above a compact footer row; stacked vertically on 390px mobile.

### Publish Event API · [BRAND] Docs (`#/docs/api-publish`)
1. **Endpoint Reference, Parameters & Interactive Playground** — Full API reference page for `POST /v3/events` (switches to `POST /v2/dispatch` when version v2 is selected), complete with request/response parameter tables, synced JS/Python/cURL examples, error code callout, and live interactive Try It panel.
   Layout: Rendered inside the same three-column docs shell.

### Changelog · [BRAND] Docs (`#/changelog`)
1. **Versioned Release Timeline** — Structured SDK changelog covering v3.4 (Latest), v3.2, v3.0 (Major), and v2.8 (Maintenance LTS) with filter pills (All, Features, Breaking, Fixes) and clear migration callouts. Uses version tags and release badges only (no calendar dates).
   Layout: Centered 820px timeline with left version badges and right release cards.

### Page Not Found · [BRAND] Docs (`#/404`)
1. **Helpful 404 Fallback** — Graphic 404 card in Graphite, Ultraviolet, and Lime showing the unmatched path, quick links to Quickstart, API Reference, and Changelog, plus a button to launch the Cmd+K heading search modal.
   Layout: Centered card inside the documentation shell.

## Assets
- icon: Install lucide-react (ISC) for sidebar chevrons, callout icons, search, copy, theme toggle, and version indicators.
- font: Install @fontsource/plus-jakarta-sans, @fontsource/inter, and @fontsource/jetbrains-mono (OFL) and import directly in src/main.tsx.
- image: Draw the [BRAND] geometric mark and the Quickstart event-routing architecture diagram as clean inline SVG components.

## Don'ts
- No real documentation platform or SDK brand names anywhere in copy, code, or sample endpoints.
- No calendar dates, months, or four-digit years anywhere on the rendered pages (changelog uses version numbers and release labels like 'Latest' or 'LTS').
- No backend, remote search APIs, or external CDN scripts/fonts; all 18+ Markdown pages bundle locally.
- No source maps in production build (build.sourcemap: false) and keep dist/ under 20 MB.
- No emoji characters used as UI icons or callout markers; use Lucide icons.
- No clip-path reveal tricks hiding sections until scroll.
- No horizontal page overflow at 1440x900 desktop or 390x844 mobile.

---
— Prompt by VibeFather · https://vibefather.ai/t/product-documentation-website · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 产品文档网站

完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。

## 简介
为 [BRAND](`[PKG_NAME]`)构建一个以指南为先、三栏布局的开发者 SDK 文档网站,由直接打包进静态构建的 18+ 个本地 Markdown 文件支撑。包含可用的 v2/v3 版本切换器、全页面同步的 JavaScript/Python/cURL 代码标签页、交互式“Try it”请求演练场、Cmd+K 标题搜索、随滚动跟踪的右侧目录、本地有用性反馈、变更日志,以及自定义 404 页面。

- 受众:软件工程师、开发者体验负责人,以及负责交付 SDK 指南和 API 参考的技术写作者。
- 目标:为访客提供一个权威、可快速浏览的文档网站,首屏直接打开内容丰富的快速开始(Quickstart)指南,包含实时代码标签页、步骤、提示框,以及交互式请求面板。
- 语气:清晰、直接、工程优先的技术写作,配有具体载荷、精炼的参数定义,零营销废话。

## 技术栈
- 框架:Vite 6 + React 18 + TypeScript
- 样式:Tailwind CSS 4
- 库:lucide-react(ISC)、@fontsource/plus-jakarta-sans(OFL-1.1)、@fontsource/inter(OFL-1.1)、@fontsource/jetbrains-mono(OFL-1.1)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务端代码、无外部 API。
- 设置:
  - 在 vite.config.ts 中设置 base: './' 和 build: { sourcemap: false }。
  - 在 src/main.tsx 中导入 @fontsource/plus-jakarta-sans(600、700、800)、@fontsource/inter(400、500、600)和 @fontsource/jetbrains-mono(400、500、600)。
  - 在 src/content/docs/*.md 下存放 18+ 个真实的 Markdown 文档页面,并通过 import.meta.glob('./content/docs/*.md', { query: '?raw', import: 'default', eager: true }) 静态导入它们。
  - 在 src/utils/docParser.ts 中解析 Markdown front matter、标题、标注块(:::note、:::tip、:::warning、:::danger)、编号步骤、参数表格和同步代码标签组。
  - 在 src/data/docStorage.ts 中持久化首选代码语言、活动 SDK 版本(v3/v2)、颜色主题(浅色/深色)以及“Was this page helpful?”投票。

## 变量
- [BRAND] — SDK 品牌名称(默认:"RelayMesh")。虚构的开发者 SDK 产品名称
- [PKG_NAME] — 包标识(默认:"relaymesh")。小写的 npm/pip 包名和 CLI 标识
- [API_BASE] — 模拟 API 基础 URL(默认:"https://api.relaymesh.dev")。在 cURL 和 Try It 面板中显示的虚构端点 URL
- [TAGLINE] — SDK 一句话简介(默认:"Low-latency event routing, signed webhooks, and fan-out delivery for modern services.")。用于介绍横幅的简短技术副标题
- [CREDIT] — 在页脚保留一个小型 "Template by VibeFather" 链接,指向 https://vibefather.ai/t/product-documentation-website(默认:是;删除此行即可移除)

页面与区块下的文案是按默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。

## 设计
### 颜色
- 纸白(Paper White)`#FFFFFF` — 浅色模式下的主阅读画布与页头表面
- 柔轨(Soft Rail)`#F6F7FB` — 浅色模式下的侧边栏表面、表头和标注填充
- 石墨墨(Graphite Ink)`#1C1E26` — 浅色模式下的主文本色,以及深色代码块/深色模式的基础表面
- 深曜石(Deep Obsidian)`#12141B` — 深色模式页面背景,搭配 #1C1E26 卡片和 #F2F4F8 前景文本
- 紫外强调(Ultraviolet Accent)`#6C4CFF` — 激活的侧边栏项、目录滚动指示器、主按钮和交互链接(深色模式下提亮为 #9B85FF 以满足 AA 对比度)
- 青柠高亮(Lime Highlight)`#C3F53C` — 代码语法高亮、深色石墨代码框内的 HTTP 200 状态徽章,以及激活的代码标签下划线
- 琥珀警示(Amber Caution)`#F59E0B` — 警告标注和 v2 弃用提示胶囊
- 绯红警报(Crimson Alert)`#E5484D` — 危险标注和错误状态码

### 排版
- 标题与展示字体:Plus Jakarta Sans(OFL),字重 600/700/800
- 正文与 UI:Inter(OFL),字重 400/500/600
- 代码、端点与表格:JetBrains Mono(OFL),字重 400/500/600

### 布局与动效
- 间距:清晰的编辑式阅读网格:60px 吸顶顶栏、260px 左侧边栏、760px 最佳行宽中央阅读栏、桌面端(1440px)220px 右侧“On this page”目录;区块间距 24px–32px。
- 圆角:徽章、按钮和搜索输入框为 6px;深色石墨代码框、标注和交互式 Try It 面板为 10px。
- 动效:侧边栏链接上 150ms 平滑的激活指示滑动,代码标签同步,以及右侧目录高亮同步。
- 动效:侧边栏分组和 Cmd+K 搜索模态淡入采用 160ms 清晰的展开/收起。
- 动效:在所有过渡和平滑滚动跳转中遵循 prefers-reduced-motion。
- 图像:纯代码绘制的技术图形:为 [BRAND] 设计的几何紫外/青柠 SVG 标志图形、Quickstart 页面上的内联 SVG 请求管线架构图、用于标注和控件的清晰 Lucide 图标,以及带青柠高亮的高对比度深色石墨代码框。不使用外部照片。

## 页面与区块
### 快速开始 · [BRAND] 文档 (`#/docs/quickstart`)
1. **顶部文档栏与三栏外壳** — 粘性 60px 顶部页头,包含自定义几何 SVG 标记 + [BRAND] Docs 字标、顶级链接(Guides、API Reference、Changelog、404 Demo)、实时版本切换器下拉菜单('v3 (Latest)' / 'v2 (Legacy)' — 切换会真正更新页面正文、代码示例、端点路径 `/v3/events` 与 `/v2/dispatch`,并显示琥珀色 v2 提示横幅)、Cmd+K 搜索触发按钮,以及浅色/深色主题切换。左侧 260px 侧边栏列出 5 个可折叠分组,覆盖 18+ 个预置 Markdown 页面:入门(快速开始、安装、认证、配置)、核心概念(事件路由、签名 Webhook、重试策略、死信队列、幂等性)、SDK 指南(批量发布、流消费者、边缘中间件、本地测试)、API 参考(发布事件、管理路由、检查投递、Webhook 端点)以及运维(速率限制与配额、错误码)。右侧 220px 栏渲染粘性的 'On this page' 目录,通过 Ultraviolet 左侧轨道跟踪读者的滚动位置。
   布局:在 1400px 容器内使用三栏 CSS 网格(`260px minmax(0,1fr) 220px`)。低于 1180px 时右侧目录隐藏;低于 900px 时左侧边栏折叠为滑出的 'Docs menu' 抽屉。
   动效:活动目录标题通过滚动位置监听器自动高亮。
2. **指南优先的快速开始文章、同步代码标签页与交互式 Try It 面板** — 以醒目的 Graphite + Ultraviolet + Lime 主视觉条开场,展示 SDK 徽章(`[PKG_NAME] v3.4`)、快速开始标题、[TAGLINE],以及内联 SVG 架构流程(`Producer -> Edge Router -> Signed Fan-out -> Retry Queue`)。随后是编号步骤(1. 安装 `[PKG_NAME]`,2. 初始化客户端,3. 发布并验证事件),使用同步语言标签页(JavaScript、Python、cURL——点击 Python 会同时切换页面上所有多语言代码块,并持久化到 localStorage),置于深色 `#1C1E26` 框架内,带有 `#C3F53C` 青柠色强调线和一键复制按钮。包含全部四种样式化标注(Note、Tip、Warning、Danger)、结构化参数表(名称、类型、必填胶囊、描述),以及交互式 'Try it' 请求面板,用户可编辑 JSON 负载字段(`topic`、`region`、`idempotencyKey`)、选择 HTTP 方法/端点,并点击 'Send mock request' 以接收带有 HTTP 202 状态徽章和模拟延迟读数的逼真模拟 JSON 响应。
   布局:单一居中阅读栏(最大 760px),全宽代码块,响应式参数表置于 `overflow-x-auto` 框架内,Try It 小部件内为双窗格请求/响应布局。
3. **页面页脚:有用投票、编辑链接与上一页/下一页导航** — 底部栏包含 'Was this page helpful?' 是/否按钮,按页面持久化到 localStorage(投票后显示感谢确认)、指向页面 Markdown 路径的 'Edit this page on Git' 链接(例如 `src/content/docs/quickstart.md`)、并排的上一页/下一页卡片,以及带有可选 [CREDIT] 链接的细微页脚。
   布局:两栏上一页/下一页卡片位于紧凑页脚行上方;在 390px 移动端垂直堆叠。

### 发布事件 API · [BRAND] 文档 (`#/docs/api-publish`)
1. **端点参考、参数与交互式演练场** — `POST /v3/events` 的完整 API 参考页面(选择版本 v2 时切换为 `POST /v2/dispatch`),包含请求/响应参数表、同步的 JS/Python/cURL 示例、错误码标注以及实时交互式 Try It 面板。
   布局:渲染在相同的三栏文档外壳内。

### 变更日志 · [BRAND] 文档 (`#/changelog`)
1. **版本化发布时间线** — 结构化 SDK 变更日志,涵盖 v3.4(最新)、v3.2、v3.0(主要版本)和 v2.8(维护 LTS),带有筛选胶囊(All、Features、Breaking、Fixes)和清晰的迁移标注。仅使用版本标签和发布徽章(无日历日期)。
   布局:居中 820px 时间线,左侧版本徽章,右侧发布卡片。

### 页面未找到 · [BRAND] 文档 (`#/404`)
1. **有用的 404 回退** — Graphite、Ultraviolet 和 Lime 配色的图形化 404 卡片,显示未匹配路径、快速开始、API 参考和变更日志的快速链接,以及启动 Cmd+K 标题搜索模态框的按钮。
   布局:文档外壳内的居中卡片。

## 资源
- 图标:安装 lucide-react(ISC),用于侧边栏折叠箭头、提示框图标、搜索、复制、主题切换和版本指示器。
- 字体:安装 @fontsource/plus-jakarta-sans、@fontsource/inter 和 @fontsource/jetbrains-mono(OFL),并在 src/main.tsx 中直接导入。
- 图片:将 [BRAND] 几何标志和 Quickstart 事件路由架构图绘制为简洁的内联 SVG 组件。

## 不要做的事
- 文案、代码或示例端点中不得出现任何真实文档平台或 SDK 品牌名称。
- 渲染页面上的任何位置都不得出现日历日期、月份或四位年份(更新日志使用版本号和 'Latest' 或 'LTS' 等发布标签)。
- 不得使用后端、远程搜索 API 或外部 CDN 脚本/字体;所有 18+ 个 Markdown 页面均在本地打包。
- 生产构建中不得包含 source map(build.sourcemap: false),并保持 dist/ 在 20 MB 以下。
- 不得使用 emoji 字符作为 UI 图标或标注标记;请使用 Lucide 图标。
- 不得使用 clip-path 揭示技巧将区块隐藏至滚动时才显示。
- 在 1440x900 桌面端或 390x844 移动端不得出现页面水平溢出。

---
— Prompt by VibeFather · https://vibefather.ai/t/product-documentation-website · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Product Documentation Website"
colors:
  paper_white: "#FFFFFF"
  soft_rail: "#F6F7FB"
  graphite_ink: "#1C1E26"
  deep_obsidian: "#12141B"
  ultraviolet_accent: "#6C4CFF"
  lime_highlight: "#C3F53C"
  amber_caution: "#F59E0B"
  crimson_alert: "#E5484D"
typography:
  headings_display: { family: "Plus Jakarta Sans", weights: [600, 700, 800] }
  body_prose_ui: { family: "Inter", weights: [400, 500, 600] }
  code_endpoints_tables: { family: "JetBrains Mono", weights: [400, 500, 600] }
spacing: "Crisp editorial reading grid: 60px sticky top bar, 260px left sidebar, 760px optimal-measure central reading column, 220px right 'On this page' TOC on desktop (1440px); 24px–32px section gaps."
radius: "6px for badges, buttons, and search inputs; 10px for dark graphite code frames, callouts, and interactive Try It panels."
---

# Product Documentation Website — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **Paper White** `#FFFFFF` — Primary light-mode reading canvas and header surface
- **Soft Rail** `#F6F7FB` — Sidebar surface, table headers, and callout fills in light mode
- **Graphite Ink** `#1C1E26` — Primary text in light mode and dark code-block / dark-mode base surface
- **Deep Obsidian** `#12141B` — Dark-mode page background with #1C1E26 cards and #F2F4F8 foreground text
- **Ultraviolet Accent** `#6C4CFF` — Active sidebar item, TOC scroll indicator, primary buttons, and interactive links (lightened to #9B85FF in dark mode for AA contrast)
- **Lime Highlight** `#C3F53C` — Code syntax highlights, HTTP 200 status badge inside dark graphite code frames, and active code-tab underline
- **Amber Caution** `#F59E0B` — Warning callouts and v2 deprecation notice pills
- **Crimson Alert** `#E5484D` — Danger callouts and error status codes

## Typography
- **Headings & Display** — Plus Jakarta Sans (OFL), weights 600/700/800. Self-host the font files.
- **Body Prose & UI** — Inter (OFL), weights 400/500/600. Self-host the font files.
- **Code, Endpoints & Tables** — JetBrains Mono (OFL), weights 400/500/600. Self-host the font files.

## Spacing & shape
- Spacing: Crisp editorial reading grid: 60px sticky top bar, 260px left sidebar, 760px optimal-measure central reading column, 220px right 'On this page' TOC on desktop (1440px); 24px–32px section gaps.
- Radius: 6px for badges, buttons, and search inputs; 10px for dark graphite code frames, callouts, and interactive Try It panels.

## Motion
- Smooth 150ms active-indicator glide on sidebar links, synced code tabs, and right-hand TOC highlight.
- Crisp 160ms expand/collapse on sidebar groups and Cmd+K search modal fade.
- Respect prefers-reduced-motion across all transitions and smooth-scroll jumps.

## Imagery
Pure code-drawn technical graphics: geometric ultraviolet/lime SVG logo mark for [BRAND], inline SVG request-pipeline architecture diagram on the Quickstart page, crisp Lucide icons for callouts and controls, and high-contrast dark graphite code frames with lime highlights. No external photos.

## Tone
Clear, direct, engineering-first technical writing with concrete payloads, crisp parameter definitions, and zero marketing filler.

---
— Prompt by VibeFather · https://vibefather.ai/t/product-documentation-website · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 面向内部平台团队:将 BRAND 设为你的平台名称,用你的服务端点替换 API 参考组,并让 Try It 面板指向你的模拟负载。
  • 面向发布首个 SDK 的初创公司:将 PKG_NAME 设为你的 npm 包名,按你的安装命令改写快速入门步骤,并使用更新日志时间线来发布版本说明。
  • 面向为公共 API 编写文档的技术写作者:保留三栏外壳,将预置的 Markdown 页面替换为你的端点指南,并将 API_BASE 设为你的真实基础 URL。
  • 面向讲授事件系统的开发者体验负责人:保留架构图和提示块,将核心概念组重命名为你自己的主题,并调整参数表。

产品文档网站:常见问题

在产品文档网站模板中,如何更改 SDK 品牌、包名和 API 地址?

产品文档网站模板通过四个变量进行替换:BRAND 代表 SDK 名称,PKG_NAME 代表小写的包名标识,API_BASE 代表 cURL 和 Try It 面板中显示的端点,TAGLINE 代表一句话简介。默认值分别是 RelayMesh、relaymesh、https://api.relaymesh.dev 和一段简短的事件路由简介。设置一次后,再改写所有引用这些变量的标题和代码示例,确保文档保持一致。

这个文档模板中的 v2 和 v3 版本切换器是如何工作的?

产品文档网站模板自带一个版本下拉菜单,能在 v3(最新版)和 v2(旧版)之间真正切换页面正文、代码示例、端点路径和参数表。选择 v2 时会显示琥珀色的弃用通知横幅,并将发布端点从 /v3/events 改为 /v2/dispatch。当前版本会保存在本地存储中,回访读者会停留在上次使用的版本。

我可以在产品文档网站模板中添加自己的文档页面和指南吗?

可以。产品文档网站模板将 18+ 个文档页面存为本地 Markdown 文件,分为五个指南组:入门、核心概念、SDK 指南、API 参考和运维。添加或编辑页面只需编写 Markdown,无需改动 React 组件。解析器会处理 front matter、标题、提示块、编号步骤、参数表和同步代码标签组,因此新页面会自动沿用相同的布局。

产品文档网站模板中的 Try it 请求面板是做什么的?

Try it 面板是快速入门和 API 参考页面中的交互式请求运行器。读者可以编辑 topic、region、idempotencyKey 等 JSON 负载字段,选择 HTTP 方法和端点,然后点击“发送模拟请求”,即可收到逼真的模拟 JSON 响应,附带 HTTP 202 状态徽章和模拟延迟读数。它完全在浏览器中运行,不依赖后端或外部 API 调用,因此可以安全地作为静态站点托管。

这个开发者文档模板中的同步代码标签页和 Cmd+K 搜索是如何工作的?

产品文档网站模板会让 JavaScript、Python 和 cURL 示例在全页保持同步:点击 Python 会同时切换所有多语言代码块,选择会保存在本地存储中。每个代码块都有一键复制按钮。Cmd+K 搜索面板会索引每个文档标题,支持完整的键盘导航,读者无需滚动侧边栏即可直接跳转到某个章节。

怎么用 AI 做一个产品文档网站?

复制本页的提示词,或者运行 npx vibefather add product-documentation-website,把 [BRAND]、[TAGLINE]、[API_BASE]、[PKG_NAME] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。