Summarized from here.
mkdir eleventy-sample && cd eleventy-sample
npm init -y
echo '<!doctype html><title>Page title</title><p>Hi</p>' > index.html
echo '# Page header' > README.md
npx @11ty/eleventy
npx @11ty/eleventy --serve
If you run into errors, might not be a bad idea to do the following:
npm cache clear --force
npm install