[English] | [中文]
- This is the Klipper-related documentation for Fly.
Installation and Deployment in Windows Environment
-
Git Environment Installation
- Download and install [Git]
-
Nodejs Environment Installation
- Download and installation guide [Node.js]
- Refer to [runoob nodejs install]
- After installation, open PowerShell with administrative privileges and execute the following command
set-ExecutionPolicy RemoteSigned - When prompted whether to change the execution policy, type
Yand press Enter to confirm. - Open a new terminal and enter the following commands to test if the installation was successful
node -v npm -v
- If both commands execute without errors, the environment installation is successful.
-
Pull Current Documentation
- Open File Explorer, find the folder where you want to store the documentation (requires more than 6GB of free space), right-click, and select “Open in Terminal”
- Enter the following command to clone the repository
git clone https://github.com/kluoyun/fly-docs-next.git
- Ensure that the repository is cloned successfully.
-
Install Dependencies
- In the project root directory, enter the following command
npm install -g pnpm pnpm install - If all commands execute without errors, continue to the next steps.
- Since the canvas package requires the Windows SDK environment for compilation, manually download and install the precompiled package, skipping the compilation step.
- Download the precompiled package for the node-canvas package from [node-canvas pre]
- Extract the downloaded
canvas-v2.11.2-node-v115-win32-unknown-x64.tar.gzto obtain theReleasefolder. - Copy the extracted
Releasefolder to thenode_modules\.pnpm\canvas@2.11.2\node_modules\canvas\builddirectory under the documentation directory, and replace it.
- In the project root directory, enter the following command
-
Compile Project
- In the project root directory, enter the following command to compile only the Chinese documentation (compiling all languages takes approximately 15-30 minutes)
pnpm run build --locale zh-Hants
- If you need to compile the complete documentation, use the following command (which will automatically compile all languages in sequence)
pnpm run build
- If the compilation command executes without errors, continue to the next steps.
- In the project root directory, enter the following command to compile only the Chinese documentation (compiling all languages takes approximately 15-30 minutes)
-
Local Live Preview
- If you are modifying the documentation and need real-time preview, use the following command
pnpm run start --host 0.0.0.0 --port 3000
- Successful execution will automatically open a browser. If you do not want the browser to open automatically, add the parameter
--no-openat the end of the above command, separated by a space. - The default preview is in Chinese; other languages require adding the parameter
--locale xx, such as--locale en. - Note: Real-time preview does not support anchor links for switching between multiple languages. To test multi-language switching, skip this step and proceed to the following
Step 7.
- If you are modifying the documentation and need real-time preview, use the following command
-
Start Local Service
- Before continuing with this step, ensure that the documentation has been compiled, otherwise there will be errors.
- If you have not compiled, please go back to
Step 5. - After successful compilation, in the project root directory, enter the following command
pnpm run serve --host 0.0.0.0 --port 3000
- Successful execution will automatically open a browser. If you do not want the browser to open automatically, add the parameter
--no-openat the end of the above command, separated by a space. - Note: The local service supports multi-language switching and a complete environment, identical to the online version. The specific supported languages depend on the parameters during compilation.
Installation and Deployment in Linux Environment
[!NOTE] The following steps apply only to Debian-based distribution systems; other versions may vary, please refer accordingly.
-
Environment Installation
- Execute the following commands to install dependencies
sudo apt-get update sudo apt-get install -y git build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- Execute the following commands to install dependencies
-
Nodejs Environment Installation
- Download and install [Node.js]
- Refer to [runoob nodejs install]
- After installation, open a new terminal and enter the following commands to test if the installation was successful
node -v npm -v
- If both commands execute without errors, the environment installation is successful.
-
Pull Current Documentation
- Open File Explorer, find the folder where you want to store the documentation (requires more than 6GB of free space), right-click, and select “Open in Terminal”
- Enter the following command to clone the repository
git clone https://github.com/kluoyun/fly-docs-next.git
- Ensure that the repository is cloned successfully.
-
Install Dependencies
- In the project root directory, enter the following command
npm install -g pnpm pnpm install
- If all commands execute without errors, continue to the next steps.
- In the project root directory, enter the following command
-
Compile Project
- In the project root directory, enter the following command to compile only the Chinese documentation (compiling all languages takes approximately 15-30 minutes)
pnpm run build --locale zh-Hants
- If you need to compile the complete documentation, use the following command (which will automatically compile all languages in sequence)
pnpm run build
- If the compilation command executes without errors, continue to the next steps.
- In the project root directory, enter the following command to compile only the Chinese documentation (compiling all languages takes approximately 15-30 minutes)
-
Local Live Preview
- If you are modifying the documentation and need real-time preview, use the following command
pnpm run start --host 0.0.0.0 --port 3000
- Successful execution will automatically open a browser. If you do not want the browser to open automatically, add the parameter
--no-openat the end of the above command, separated by a space. - The default preview is in Chinese; other languages require adding the parameter
--locale xx, such as--locale en. - Note: Real-time preview does not support anchor links for switching between multiple languages. To test multi-language switching, skip this step and proceed to the following
Step 7.
- If you are modifying the documentation and need real-time preview, use the following command
-
Start Local Service
- Before continuing with this step, ensure that the documentation has been compiled, otherwise there will be errors.
- If you have not compiled, please go back to
Step 5. - After successful compilation, in the project root directory, enter the following command
pnpm run serve --host 0.0.0.0 --port 3000
- Successful execution will automatically open a browser. If you do not want the browser to open automatically, add the parameter
--no-openat the end of the above command, separated by a space. - Note: The local service supports multi-language switching and a complete environment, identical to the online version. The specific supported languages depend on the parameters during compilation.
Docker Site Deployment
[!TIP] The following is a deployment guide for static documentation sites in Docker containers, not for development Docker containers.
-
Pull Image
- Execute the following command to pull the image, which is approximately 6GB in size.
docker pull ghcr.io/kluoyun/fly-docs-next:latest
- Pulling the image may take some time, please be patient.
- Execute the following command to pull the image, which is approximately 6GB in size.
-
Create and Run Container
- Execute the following command to create and run the container
docker run -d -it --name fly-docs-next -p 3000:80 ghcr.io/kluoyun/fly-docs-next:latest
- Execute the following command to create and run the container
Tip
Most of the content on the site except Chinese and Japanese is generated by AI. Please pay attention to the correctness of the code and configuration files.
| CODE | Language | Status | Maintainer |
|---|---|---|---|
| ALL | Entire project | ALL | |
| EN | English | AI | |
| JA | 日本語 | ||
| FR | Français | ||
| DE | Deutsch | ||
| RU | Русский | ||
| KO | 한국어 |