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. If the --deploy option is passed, the issue checks marked for deployment will be run.

-a --all

run all checks

-L --list

list all checks

-d --deploy

run checks for deployment

compile

compile [options]

Compile all items of the current site.

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.

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 [thing]

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 on all IP addresses. Running this static web server requires adsf (not asdf!).

-H --handler

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

-o --host

specify the host to listen on (default: 0.0.0.0)

-p --port

specify the port to listen on (default: 3000)