11tyThe possum is Eleventy’s mascot

Eleventy Documentation

This is an older version of Eleventy. Full release history. Go to the newest Eleventy docs. You could try /docs/usage/ although it may not exist.

Documentation Pages

Command Line Usage #

# Defaults: searches the current directory, outputs to ./_site
eleventy

# Equivalent to
eleventy --input=. --output=_site

Read more about --input and --output.

A hypothetical template.md in the current directory would be rendered to _site/template/index.html. Read more at Permalinks.

# Use only a subset of template types
eleventy --formats=md,html,ejs
# Find out the most up-to-date list of commands (there are more)
eleventy --help

Run Eleventy when you save #

# Boot up a browsersync web server to apply changes and
# refresh automatically. We’ll also --watch for you.
eleventy --serve
eleventy --serve --port=8081
# Automatically run when input template files change.
# Useful if you have your own web server.
eleventy --watch

--quiet if the Output is Too Noisy #

# Shhhhh—Don’t log so much to the console
eleventy --quiet

--dryrun to do a Little Testing #

Runs without writing to the file system. Useful when debugging.

# Run Eleventy but don’t write any files
eleventy --dryrun

--config to Change the Config file name #

# Override the default eleventy project config filename (.eleventy.js)
eleventy --config=myeleventyconfig.js

Examples #

Using the Same Input and Output #

Yes, you can use the same input and output directories, like so:

# Parse and write Markdown to HTML, respecting directory structure.
eleventy --input=. --output=. --formats=md
Careful with --formats=html here! If you run eleventy more than once, it’ll try to process the output files too. Read more at the HTML template docs.