Command-line interface

Global options

-l --color

enable color

-d --debug

enable debugging

-e --env

set environment

-h --help

show the help message and quit

-C --no-color

disable color

-V --verbose

make output more detailed

-v --version

show version information and quit

-w --warn

enable warnings

check

check [options] [names]

Run issue checks on the current site. If the --all option is passed, all available issue checks will be run. By default, the issue checks marked for deployment will be run.

-a --all

run all checks

-L --list

list all checks

-d --deploy

(deprecated)

compile

compile [options]

Compile all items of the current site.

--diff

generate diff

-W --watch

watch for changes and recompile when needed

create-site

create-site [options] path

Create a new site at the given path. The site will use the filesystem data source.

Also known as create_site, cs.

--force

force creation of new site

deploy

deploy [target] [options]

Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the --target option.

-t --target

specify the location to deploy to (default: default)

-C --no-check

do not run the issue checks marked for deployment

-L --list

list available locations to deploy to

-D --list-deployers

list available deployers

-n --dry-run

show what would be deployed

help

help [command_name]

Show help for the given command, or show general help. When no command is given, a list of available commands is displayed, as well as a list of global command-line options. When a command is given, a command description, as well as command-specific command-line options, are shown.

-v --verbose

show more detailed help

prune

prune

Find all files in the output directory that do not correspond to an item managed by Nanoc and remove them. Since this is a hazardous operation, an additional --yes flag is needed as confirmation.

Also see the auto_prune configuration option in nanoc.yaml (config.yaml for older Nanoc sites), which will automatically prune after compilation.

-y --yes

confirm deletion

-n --dry-run

print files to be deleted instead of actually deleting them

shell

shell

Open an IRB shell on a context that contains @items, @layouts, and @config.

Also known as console, sh.

-p --preprocess

run preprocessor

show-data

show-data

Show information about all items, item representations and layouts in the current site, along with dependency information.

Also known as debug.

show-plugins

show-plugins [options]

Show a list of available plugins, including filters and data sources. If the current directory contains a Nanoc web site, the plugins defined in this site will be shown as well.

Also known as info.

show-rules

show-rules

Prints the rules used for all items and layouts in the current site.

Also known as explain.

view

view [options]

Start the static web server. Unless specified, the web server will run on port 3000 and listen 127.0.0.1. Running this static web server requires adsf (not asdf!).

-H --handler

specify the handler to use (webrick/puma/…)

-o --host

specify the host to listen on

-p --port

specify the port to listen on

-L --live-reload

reload on changes