Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 2.18 KB

File metadata and controls

82 lines (58 loc) · 2.18 KB

CLI reference

The italic binary has six subcommands. Run italic --help or italic <command> --help for the same information at the terminal.

italic build

Run the full build pipeline once, writing the site into the output directory (public/ by default; see output_dir).

Flag Default Meaning
--drafts off Include documents marked draft: true in the output.

Without --drafts, drafts are dropped at the start of the build and never appear in the output — nor in collections, taxonomies, or backlinks. See Drafts.

italic build            # production build
italic build --drafts   # staging build that includes drafts

italic serve

Build the site, serve it locally with live reload, and rebuild on every change to the source directories. Drafts are always included while serving.

Flag Default Meaning
--port <PORT> 3000 Port to bind.
--host <HOST> 127.0.0.1 Host address to bind.
italic serve
italic serve --port 8080
italic serve --host 0.0.0.0 --port 8080   # reachable from other devices on your network

italic watch

Rebuild on every change to the source directories, without running a server. Drafts are always included while watching. Useful when another tool is serving the output directory.

italic watch

italic new <path>

Scaffold an empty starter site at <path>. The path must not already exist. The scaffold includes a fully commented config.yaml showing every available key with its default.

italic new my-site

italic scaffold

Copy the configured theme's starter content into your content/ directory. Requires a theme: key in config.yaml. Existing files are skipped, so it is safe to run in a project that already has content. See Themes.

italic scaffold

italic clean

Remove the output directory (public/ by default).

italic clean

See also