Deploy a static website
Pre-requisites
Section titled “Pre-requisites”You must have Node.js installed.
Minimum supported version is 20.x, but using the latest stable version is recommended.
You can also use LikeC4 Docker.
Run build
command, that prepares a folder with static files ready to be deployed to any host.
npx likec4 build -o ./dist
Available options:
Option | Description |
---|---|
-o, --output | Output directory |
--base | Base URL the app is being served from, e.g. ”/”, “/pages/” or ”./” for a relocatable app |
--use-hash-history | Hash-based navigation, e.g. ”/#/view” instead of “/view” |
--use-dot | Use local binaries of Graphviz (“dot”) instead of bundled WASM |
--title | Base title of the app pages (default is “LikeC4”) |
--output-single-file | Generates a single self-contained HTML file |
To see all available options run:
npx likec4 build -h
Deploy
Section titled “Deploy”LikeC4 CLI uses Vite to build the website.
All the examples from Vite documentation apply to LikeC4, just replace vite build
with likec4 build
.