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/getting-started/ although it may not exist.

Documentation Pages

Getting Started #

Requires version 8 of Node.js or higher.

npm install -g @11ty/eleventy

Available on npm. Previously known as eleventy-cli. Read more about local installation.

Run Eleventy #

Make a directory with your project in it. Don’t include ~ $ when you run these commands.

~ $ mkdir eleventy-sample
~ $ cd eleventy-sample

Run eleventy:

~/eleventy-sample $ eleventy
Wrote 0 files in 0.02 seconds

Makes sense—this is an empty folder with no templates inside. So, let’s make a few templates.

~/eleventy-sample $ echo '<!doctype html><html><head><title>Page title</title></head><body><p>Hi</p></body></html>' > index.html
~/eleventy-sample $ echo '# Page header' > README.md

We’ve now created an HTML template and a markdown template. Now run eleventy again:

~/eleventy-sample $ eleventy
Writing _site/README/index.html from ./README.md
Writing _site/index.html from ./index.html
Wrote 2 files in 0.10 seconds

This will compile any content templates in the current directory or subdirectories into the output folder (defaults to _site).

Use eleventy --serve to start up a hot-reloading local web server.

~/eleventy-sample $ eleventy --serve
Writing _site/README/index.html from ./README.md
Writing _site/index.html from ./index.html
Wrote 2 files in 0.10 seconds
Watching…
[Browsersync] Access URLs:
------------------------------------
Local: http://localhost:8080

(some output truncated)

[Browsersync] Serving files from: _site

Go to http://localhost:8080/ or http://localhost:8080/README/ to see your Eleventy site live! Save your files and watch the page refresh for you automatically.

Congratulations—you made something with Eleventy! Now put it to work with templating syntax, front matter, and data files.

➡ Continue: Command Line Usage