This is the official documentation project of Salvo, built on Rspress.
This project uses Bun as the package manager and runtime environment. Before you begin, make sure Bun is installed:
# Install Bun
curl -fsSL https://bun.sh/install | bash
Use Bun to install project dependencies:
bun install
This project contains the following main directories:
docs
: Document source file directory, containing all official Salvo documentationutils
: Utility script directory, various scripts for assisting document generation and maintenancecodes
: Sample code in the Salvo library repository, copied directly from the Salvo main repositorycodes_md
: Markdown document automatically generated from thecodes
directory and theSalvoCargo.toml
file in the root directory
bun run utils/tool name Run tool
bun run utils/files2md
: Convert all mdx files into one md file (for generating long context for llm)bun run utils/gen_code_md2
: Markdown document automatically generated by thecodes
directory and theSalvoCargo.toml
file in the root directory, mainly completing:
- Convert sample code (such as .rs files) to .mdx format
- Replace Salvo and other third-party library dependencies in cargo.toml with specific version numbers
bun run utils/translation_tool
: Translation tool,
- Set the environment variable
OPENAI_API_KEY
Currently using deepseek V3 for translation. - The md5 of the translation file will be used as a comment and attached to the translated document, and the translated document will be skipped during translation. Please check the tool notes before using the tool
After using the translation tool, please check that the page rendering is as expected and there are no errors
Start the development server:
bun run dev
Build the production version:
bun run build
Preview the production build locally:
bun run preview
We welcome every developer interested in Salvo to participate in the improvement and improvement of the documentation. You can contribute in the following ways:
- Submit bug fixes or document updates
- Improve the content and structure of existing documents
Before submitting a contribution, please make sure your changes meet the style and standards of the project.
Thank you for your support of the Salvo project!