Skip to content

Deploy a static website

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.

Terminal window
npx likec4 build -o ./dist

Available options:

Option Description
-o, --output Output directory
--base Base URL from which the app is being served, 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:

Terminal window
npx likec4 build -h

The LikeC4 CLI uses Vite to build the website.

All the examples from Vite documentation apply to LikeC4, just replace vite build with likec4 build.