Contributing
This guide helps you clone the repo, pick a code editor, and contribute updates to the docs.
Clone the repo
- Make sure
git,node, andpnpmare installed. - Clone the repository.
- Install the docs dependencies from inside
docs/.
git clone https://github.com/refly-ai/nexu.git
cd nexu/docs
pnpm installOpen the project in an editor
We recommend Cursor because it works well for long-form markdown editing, repo-wide search, and AI-assisted doc updates.
- Open the repository root so the workspace settings in
.vscode/are applied. - You can also use VS Code if you prefer a standard editor workflow.
- Keep your markdown source files under
docs/en/anddocs/zh/.
Run the docs locally
cd docs
pnpm devVitePress starts a local preview server so you can verify links, headings, and images before opening a pull request.
Writing workflow
- English pages live in
docs/en/. - Chinese pages live in
docs/zh/. - Keep both language versions aligned when you add a new guide or update contributor-facing instructions.
- Add new guide pages to
docs/.vitepress/config.tsso they show up in the sidebar.
Paste images into markdown
We recommend the telesoho.vscode-markdown-paste-image extension for pasting screenshots directly into markdown files.
Install the extension
- Open the repo in Cursor or VS Code.
- Accept the workspace recommendation for
telesoho.vscode-markdown-paste-image, or install it manually from the Extensions view.
Default image path
This repo already includes a workspace setting in .vscode/settings.json:
{
"MarkdownPaste.path": "${workspaceFolder}/docs/public/assets"
}That means pasted images are saved into docs/public/assets/ by default.
How to use it
- Copy a screenshot to your clipboard.
- Open the target markdown file in
docs/en/ordocs/zh/. - Run
Markdown Paste, or useCmd+Option+Von macOS /Ctrl+Alt+Von Windows and Linux. - Insert the generated image link into the markdown source.
Linking convention
Because VitePress serves files from docs/public/ at the site root, use links like this in markdown:
Use clear filenames and alt text so screenshots stay maintainable.
Before you submit
- Verify both language versions if your change should exist in English and Chinese.
- Run the local docs preview and check the rendered page.
- Confirm new images load correctly from
/assets/.... - Keep changes focused so they are easy to review.