Start an Eleventy site from scratch
This is the most basic of sites, but the start of something great! All other recipes will assume you have everything below (What you'll need) and at least this very basic Eleventy setup.
What you'll need
☑️ A terminal emulator (iTerm2)
☑️ node.js (https://nodejs.org)
☑️ npm
☑️ A web browser (Firefox)
Directions
- Create a directory for your Eleventy project
mkdir my-eleventy-project
- Change to your Eleventy project directory
cd my-eleventy-project
- Create a package.json file
npm init -y
- Install Eleventy in the local directory
npm install --save-dev @11ty/eleventy
- Create an index page using Markdown
echo '# My Eleventy Project' > index.md
- Process the index page with Eleventy and start a local server
npx @11ty/eleventy --serve
- Your site can be viewed locally by visiting http://localhost:8080
Resources
- Official Eleventy website/documentation
- Official Eleventy Discord
- Beginner's Guide to Eleventy (Tatiana Mac)
- Learn Eleventy from Scratch (Andy Bell)
- Learn with Jason: Let's Learn Eleventy w/ Zach Leatherman (Jason Lengstorf)
- Building a Static Site with Eleventy (Bryan Robinson)