Skip to main content

CLI

lfpdocs is an abstraction built around Eleventy's own CLI. It offers a simplified

lfpdocs is recommended for anyone who does not further care on how things are wired up in the background. If you do not need to access underlying Eleventy features, consider only using lfpdocs for development and building.

Commands

lfpdocs offers a set of commands. The following is a short overview of each command's functionality. You can always set the --help/-h flag on every command to get help on the command line.

init

init helps with setting up the project structure that LFP Docs expects by default. If you either prefer your own custom structure you can bypass this command by setting everything up yourself, but you can also make changes after init has been applied.

Options

-a
-add-commands
Adds npm run commands for build and local development server to package.json.
-f
-filename
Eleventy config file name; default 'eleventy.config.js'.
--force
If set, overwrites existing files; use with caution.
-i
--input
Where to place documentation source files; default 'docs'. Sets the value in *LFP Docs*' configuration.
-o
--output
The project's or documentation's output path; default '_site'. Sets the value in *LFP Docs*' configuration.
-t
--title
The project's or documentation's title.

dev

This command sets up Eleventy's default development server, which is small, fast, and reliable. It watches your input files and restarts automatically when changes occur, so that the preview in the browser is always up to date. By default, the server is accessible through http://localhost:8080.

Options

-v
-verbose
By default, lfpdocs dev does not output information. Use this option to pipe through Eleventy's output.

build

This command builds the compiled static output, ready for production. It uses the settings of LFP Docs' configuration for input and output directories; though you can overwrite these with this command (see below).

Options

-i
--input
Overwrite the configuration's input path.
-o
--output
Overwrites the configuration's output path.
-v
--verbose
By default, lfpdocs build does not output information. Use this option to pipe through Eleventy's output.