Documentation

Publish Documentation

Write a product guide, add it to the sidebar, then preview and publish it

Documentation lives in content/docs/. Write headings, steps, and examples in Markdown, then save to preview locally. You do not need a separate content management system.

1. Create a Guide

Create content/docs/my-guide.mdx. Copy the example below and adapt it to a task your product supports:

content/docs/my-guide.mdx
---
title: Generate Your First Image
description: Describe an image, generate it, and download the result
---

## Before You Start

Sign in and check that you have enough credits.

## Generate an Image

1. Open the image generation page.
2. Choose a model and describe the image you want.
3. Click Generate, wait for the result, then download it.

## Next Steps

Add a style and aspect ratio to your description and try another image.

Set the page title in the title field at the top and start the body with ## headings. Explain where to act, what to enter, and what readers should see after each step.

Keep pnpm dev running and open /docs/my-guide to preview.

2. Add the Chinese Version

Create content/docs/my-guide.zh.mdx with the same structure and translate its title, description, and body. Preview it at /zh/docs/my-guide.

Keep the base filename the same. Use /zh/... for internal links in Chinese content and paths without /zh in English content.

3. Add It to the Sidebar

Open content/docs/meta.json and meta.zh.json. Add "my-guide" where you want it in the existing pages array, keeping the other entries.

For a page in a subdirectory, edit that directory's two meta files. For example, content/docs/customize/my-guide.mdx uses content/docs/customize/meta.json and meta.zh.json.

Keep page order aligned between languages and translate group labels. Existing entries such as "...customize" expand a directory; entries like "---Customization---" create group labels. You can follow those patterns.

4. Check and Publish

Open both versions and check the title, sidebar, steps, and links. Check navigation at phone width. Run pnpm build, then deploy to Cloudflare after it passes.

Removing a page from the sidebar does not hide its public URL. Move content outside content/docs/ if it is not ready to publish.

Full-text search is not connected yet; readers can use the sidebar and page table of contents.

Ask Your AI Tool

Write an English and Chinese guide for [existing product feature] in
content/docs/. First check how the feature works, then explain what
readers need, each action, and the result they should see. Add the guide
to both meta files using the existing navigation. Check both language
URLs and links, run the build check, and tell me where to preview it.

For callouts, tabs, or step components, copy an example from the MDX Syntax Reference. You can also write a blog post or publish a changelog.

On this page