build
The build
command take source files in the site
folder and compiles them to a build directory such as build/release
.
It reads site.toml
from a project directory and uses the settings for the build. If the site.toml
file declares a workspace then all projects in the workspace are compiled.
When no project directory is specified then the current working directory is used to compile a website just run:
uwe build .
The compiled site is now in build/release
.
Profile
Use the --profile
option to build into another location:
uwe build . --profile=debug
Would write files to build/debug
; you can set more build options using a custom profile.
Filters
After the project path you can pass specific folders and files to compile; for example to only build files in the site/docs
directory:
uwe build . site/docs
Usage
uwe-build 0.48.15
Compile a site
Creates a release build of the website into the `build/release` folder; use the `--profile` option to build to a
different location with alternative build settings.
If the project is a workspace all of the workspace members are compiled; filter the workspace members to build
using the `--member` option.
USAGE:
uwe build [FLAGS] [OPTIONS] [--] [ARGS]
FLAGS:
-e, --exec Allow hook command execution
-h, --help Prints help information
-i, --include-drafts Include drafts
-V, --version Prints version information
OPTIONS:
-m, --member <member>... Filter on workspace members
--profile <profile> Build profile name [default: release]
ARGS:
<project> Project path [default: .]
<paths>... Compile only these paths