Liveblocks Docs
Quick Start
Before writing, identify the target page and check its directory for a local
template. If a *.template.mdx file exists, read it completely and use it as
the primary structure for pages in that directory. Also check for the current
legacy *-template.mdx naming used by some folders.
rg --files docs/pages/<section> -g '*.template.mdx' -g '*-template.mdx'
After reading any local template, inspect nearby docs and follow their current
terminology, components, and level of detail.
When creating or restructuring a page under docs/pages/use-cases/, read and
follow
_use-case-template.mdx.
Use Canvas, Flowchart, and Slideshow as the current reference pages.
rg --files docs/pages
sed -n '1,180p' docs/pages/api-reference/liveblocks-react.mdx
sed -n '1,180p' docs/pages/products/comments/users-and-mentions.mdx
Then write the smallest docs update that makes the feature findable from the
places users are likely to look.
Workflow
Identify the docs surface:
- API reference: every new public API, prop, option, return value, or type,
plus Authentication under
docs/pages/api-reference/authentication.
- Product pages: product concepts, features, and workflows under
docs/pages/products, with canonical URLs under /docs/products.
- Use case pages: explanations of how several Liveblocks features combine for
an application type, under
docs/pages/use-cases.
- Guides: task-specific docs under
guides/pages, registered in
guides/guides.json.
- Platform pages: dashboard, account, project, webhook, REST, limits, or
infrastructure behavior.
- Get started pages: only when the setup flow changes or a feature should be
part of onboarding.
- Interactive tutorials: step-by-step learning content under
tutorial,
registered in tutorial/tutorials.json.
Decide the release size:
- Large features need API docs, a prominent feature page, and updates across
every relevant docs surface.
- Medium and small features need API docs plus every relevant usage page.
- Tiny features can usually live in one API reference section.
- Features spanning client, server, dashboard, webhooks, or packages need one
single overview or guide that ties the pieces together.
Repeat intentionally:
- Do not assume users read the overview first.
- Mention the feature in each relevant API reference and feature page.
- Link each mention to the canonical page or section.
- Check: "Can I link to one place that explains this feature?"
Match the existing page:
- Follow a folder-local
*.template.mdx or *-template.mdx before copying a
neighboring page.
- Keep existing frontmatter shape.
- Use the same heading depth and anchor style, such as
### Name [#custom-anchor].
- Use existing MDX components such as
PropertiesList, Banner, Figure,
Steps, StepCompact, and ListGrid.
- Register new docs pages in
docs/routes.json, guides in
guides/guides.json, and interactive tutorials in
tutorial/tutorials.json.
Verify:
- Run the docs link checker after making changes:
node scripts/check-docs-links.mts
It validates internal /docs/* links and #anchors in docs/pages,
guides/pages, and tutorial — the same check CI runs on docs PRs.
- Inspect changed MDX for malformed JSX, heading hierarchy, and route or
guide registration.
Style Rules
- Write simply, neutrally, and directly. Avoid marketing language.
- Start each section with the simplest useful snippet, then add optional
behavior in later subsections.
- Pick strong defaults instead of presenting equivalent options for the user to
choose between.
- Optimize for skimming with clear headings, short paragraphs, and code
comments.
- Link API names, components, hooks, and related concepts whenever mentioned.
- Include limits, pagination, loading states, error states, and permissions
where relevant.
- Prefer Suspense imports in React snippets unless the surrounding page uses
regular hooks.
- Keep snippets realistic but compact, with placeholders like
// ... for
unrelated app code.
- Use public package names in docs prose, avoid presenting
@liveblocks/core as
user-facing.
More Detail
See REFERENCE.md for placement rules, API reference structure,
MDX conventions, and review checklists.
See
_use-case-template.mdx
for the required structure, snippet patterns, and checks for use case pages.
1---2name: write-docs3description: Write and review Liveblocks documentation, API reference, guides, and quickstarts. Use when editing files under docs/, documenting a new Liveblocks feature, updating API reference pages, adding docs routes, or reviewing documentation for clarity, discoverability, and consistency.4---56# Liveblocks Docs78## Quick Start910Before writing, identify the target page and check its directory for a local11template. If a `*.template.mdx` file exists, read it completely and use it as12the primary structure for pages in that directory. Also check for the current13legacy `*-template.mdx` naming used by some folders.1415```bash16rg --files docs/pages/<section> -g '*.template.mdx' -g '*-template.mdx'17```1819After reading any local template, inspect nearby docs and follow their current20terminology, components, and level of detail.2122When creating or restructuring a page under `docs/pages/use-cases/`, read and23follow24[`_use-case-template.mdx`](../../../docs/pages/use-cases/_use-case-template.mdx).25Use Canvas, Flowchart, and Slideshow as the current reference pages.2627```bash28rg --files docs/pages29sed -n '1,180p' docs/pages/api-reference/liveblocks-react.mdx30sed -n '1,180p' docs/pages/products/comments/users-and-mentions.mdx31```3233Then write the smallest docs update that makes the feature findable from the34places users are likely to look.3536## Workflow37381. Identify the docs surface:39 - API reference: every new public API, prop, option, return value, or type,40 plus Authentication under `docs/pages/api-reference/authentication`.41 - Product pages: product concepts, features, and workflows under42 `docs/pages/products`, with canonical URLs under `/docs/products`.43 - Use case pages: explanations of how several Liveblocks features combine for44 an application type, under `docs/pages/use-cases`.45 - Guides: task-specific docs under `guides/pages`, registered in46 `guides/guides.json`.47 - Platform pages: dashboard, account, project, webhook, REST, limits, or48 infrastructure behavior.49 - Get started pages: only when the setup flow changes or a feature should be50 part of onboarding.51 - Interactive tutorials: step-by-step learning content under `tutorial`,52 registered in `tutorial/tutorials.json`.53542. Decide the release size:55 - Large features need API docs, a prominent feature page, and updates across56 every relevant docs surface.57 - Medium and small features need API docs plus every relevant usage page.58 - Tiny features can usually live in one API reference section.59 - Features spanning client, server, dashboard, webhooks, or packages need one60 single overview or guide that ties the pieces together.61623. Repeat intentionally:63 - Do not assume users read the overview first.64 - Mention the feature in each relevant API reference and feature page.65 - Link each mention to the canonical page or section.66 - Check: "Can I link to one place that explains this feature?"67684. Match the existing page:69 - Follow a folder-local `*.template.mdx` or `*-template.mdx` before copying a70 neighboring page.71 - Keep existing frontmatter shape.72 - Use the same heading depth and anchor style, such as73 `### Name [#custom-anchor]`.74 - Use existing MDX components such as `PropertiesList`, `Banner`, `Figure`,75 `Steps`, `StepCompact`, and `ListGrid`.76 - Register new docs pages in `docs/routes.json`, guides in77 `guides/guides.json`, and interactive tutorials in78 `tutorial/tutorials.json`.79805. Verify:81 - Run the docs link checker after making changes:82 `node scripts/check-docs-links.mts`83 It validates internal `/docs/*` links and `#anchors` in `docs/pages`,84 `guides/pages`, and `tutorial` — the same check CI runs on docs PRs.85 - Inspect changed MDX for malformed JSX, heading hierarchy, and route or86 guide registration.8788## Style Rules8990- Write simply, neutrally, and directly. Avoid marketing language.91- Start each section with the simplest useful snippet, then add optional92 behavior in later subsections.93- Pick strong defaults instead of presenting equivalent options for the user to94 choose between.95- Optimize for skimming with clear headings, short paragraphs, and code96 comments.97- Link API names, components, hooks, and related concepts whenever mentioned.98- Include limits, pagination, loading states, error states, and permissions99 where relevant.100- Prefer Suspense imports in React snippets unless the surrounding page uses101 regular hooks.102- Keep snippets realistic but compact, with placeholders like `// ...` for103 unrelated app code.104- Use public package names in docs prose, avoid presenting `@liveblocks/core` as105 user-facing.106107## More Detail108109See [REFERENCE.md](REFERENCE.md) for placement rules, API reference structure,110MDX conventions, and review checklists.111112See113[`_use-case-template.mdx`](../../../docs/pages/use-cases/_use-case-template.mdx)114for the required structure, snippet patterns, and checks for use case pages.