跳到主要内容
知仓学习社ZHICANG

writing-docs

Guides for writing and editing Remotion documentation. Use when adding docs pages, editing MDX files in packages/docs, or writing documentation cont…

不碰外部(只输出文字)无严重或高危命中foryourhealth111-pixel/Vibe-Skills

它会碰到什么

扫了多少1 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Writing Remotion Documentation

Documentation lives in packages/docs/docs as .mdx files.

Adding a new page

  1. Create a new .mdx file in packages/docs/docs
  2. Add the document to packages/docs/sidebars.ts
  3. Write the content following guidelines below
  4. Run bun render-cards.ts in packages/docs to generate social preview cards

One API per page: Each function or API should have its own dedicated documentation page. Do not combine multiple APIs (e.g., getEncodableVideoCodecs() and getEncodableAudioCodecs()) on a single page. This is the established pattern throughout the codebase.

Public API only: Documentation is for public APIs only. Do not mention, reference, or compare against internal/private APIs or implementation details. Users should only see what is exported and intended for public use.

Use headings for all fields: When documenting API options or return values, each property should be its own heading. Use ### for top-level properties and #### for nested properties within an options object. Do not use bullet points for individual fields.

Language guidelines

  • Keep it brief: Developers don't like to read. Extra words cause information loss.
  • Link to terminology: Use [terminology](/docs/terminology) page for Remotion-specific terms.
  • Avoid emotions: Remove filler like "Great! Let's move on..." - it adds no information.
  • Separate into paragraphs: Break up long sections.
  • Address as "you": Not "we".
  • Don't blame the user: Say "The input is invalid" not "You provided wrong input".
  • Don't assume it's easy: Avoid "simply" and "just" - beginners may struggle.

Code snippets

Basic syntax highlighting:

const x = 1;

Type-safe snippets (preferred)

Use twoslash to check snippets against TypeScript:

import {useCurrentFrame} from 'remotion';

const frame = useCurrentFrame();

Hiding imports

Use // ---cut--- to hide setup code - only content below is displayed:

import {useCurrentFrame} from 'remotion';

// ---cut---

const frame = useCurrentFrame();

Adding titles

console.log('Hello');

Special components

Steps

- <Step>1</Step> First step
- <Step>2</Step> Second step

Experimental badge

<ExperimentalBadge>
<p>This feature is experimental.</p>
</ExperimentalBadge>

Interactive demos

<Demo type="rect"/>

Demos must be implemented in packages/docs/components/demos/index.tsx.

Generating preview cards

After adding or editing a page, generate social media preview cards:

cd packages/docs && bun render-cards.ts

Verifying docs compile

To check that documentation builds without errors:

# from the monorepo root
bun run build-docs

This validates MDX syntax, twoslash snippets, and broken links.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 3,314
本站分层T1
该仓技能数258
原文件路径bundled/skills/writing-docs/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 258 个技能