Documentation Pages
Getting Started #
Requires version 8 of Node.js or higher.
npm install -g @11ty/eleventyAvailable 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-sampleRun eleventy:
~/eleventy-sample $ eleventy
Wrote 0 files in 0.02 secondsMakes 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.mdWe’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 secondsThis 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: _siteGo 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

