Jeff Dairiki 3e1fab4f16 docs(cls): updates for lektor/lektor#1120
Note that --output-path is (now) interpreted relative to the current
working directory.
2023-03-11 12:47:16 -08:00

48 lines
1.9 KiB
Markdown

comment: This file is auto generated by dump-cli-help.py
---
title: build
---
summary: Builds the entire project into the final...
---
type: cmdlet
---
body:
`lektor build`
Builds the entire project into the final artifacts.
The default behavior is to build the project into the default build
output path which can be discovered with the `project-info` command
but an alternative output folder can be provided with the `--output-path`
option.
The default behavior is to perform a build followed by a pruning step
which removes no longer referenced artifacts from the output folder.
Lektor will only build the files that require rebuilding if the output
folder is reused.
To enforce a clean build you have to issue a `clean` command first.
If the build fails the exit code will be `1` otherwise `0`. This can be
used by external scripts to only deploy on successful build for instance.
## Options
- `-O, --output-path PATH`: The output path.
This overrides any `output_path` setting in the [project file :ref](http://localhost:5000/docs/project/file/#project).
A relative path is interpreted relative to the *current working directory*.
- `--watch`: If this is enabled the build process goes into an automatic
loop where it watches the file system for changes and rebuilds.
- `--prune / --no-prune`: Controls if old artifacts should be pruned.
This is the default.
- `-v, --verbose`: Increases the verbosity of the logging.
- `--source-info-only`: Instead of building only updates the source infos.
The source info is used by the web admin panel to quickly find
information about the source files (for instance jump to files).
- `-f, --build-flag TEXT`: Defines an arbitrary build flag. These can be
used by plugins to customize the build process. More information can be
found in the documentation of affected plugins.
- `--profile`: Enable build profiler.
- `--help`: print this help page.