Command-line arguments

Linton provides its functionality via subcommands. It also recognizes common flags:

usage: linton [-h] [-V] SUBCOMMAND ...

Make a web site from Markdown files and other resources.

options:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit

subcommands:
  SUBCOMMAND
    publish      convert a directory of Markdown files and other resources
                 into a web site
    serve        serve a Linton web site locally on your computer, for testing
    init         create a new Linton project

linton publish

usage: linton publish [-h] [-f] [-u] [--base-url URL] [--no-check-links]
                      DIRECTORY DIRECTORY

positional arguments:
  DIRECTORY         directory containing source files
  DIRECTORY         output directory

options:
  -h, --help        show this help message and exit
  -f, --force       overwrite output directory even if it is not empty
  -u, --update      update an existing site, writing only changed files
                    (implies --force)
  --base-url URL    base URL of web site relative to root of server [default:
                    /]
  --no-check-links  don't check hyperlinks in the generated site

The output DIRECTORY cannot be a subdirectory of the input directory.

Note that --update uses Nancy’s --update flag, which causes Nancy to find the input files that are referenced by a given output file, and only re-generate or copy the output file if one or more inputs is newer. This does not run any programs, so it will not detect all updates; for example, if an program referenced by a web page prints the current time, or something random. The intended use of --update is to speed up updating web sites using long-running programs whose output depends only on regular input files; for example, complex file type conversions.

linton serve

usage: linton serve [-h] [-p PORT] [DIRECTORY]

positional arguments:
  DIRECTORY             directory containing source files [default: current
                        working directory]

options:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  port on which to listen [default: random]

linton init

usage: linton init [-h] [--force] DIRECTORY

positional arguments:
  DIRECTORY   output directory

options:
  -h, --help  show this help message and exit
  --force     overwrite existing files and directories

Last updated 2025/05/22