Appearance
VPS Deployment Guide
This guide explains how to prepare the Heldsway SDK documentation for deployment as a static site on a VPS.
1. Project Initialization
Ensure you have Node.js (v18 or higher) installed on your server.
bash
# Clone the repository (if not already done)
git clone <your-repository-url>
cd heldsway-doc
# Install dependencies
npm install2. Build the Project
Generate the static production build:
bash
npm run buildThis command uses vitepress build to transform the Markdown files into optimized HTML, CSS, and JavaScript.
3. Static Deployment Path
After the build completes, all static files are generated in the following directory:
Path: .vitepress/dist
Serving the Files
You should point your web server (Nginx, Apache, etc.) to the absolute path of the .vitepress/dist folder.
Example absolute path structure:/home/user/heldsway-doc/.vitepress/dist
Important Note on Clean URLs
VitePress generates clean URLs by default (e.g., /guide/quick-start instead of /guide/quick-start.html). Ensure your static hosting or web server is configured to handle these routes correctly (usually by falling back to the .html file or index.html).