A simple starter for Eleventy static site generator by Harry Cresswell.
- Eleventy
- NPM build Scripts
- SCSS support
- Nunjucks templating
You will need the latest versions of node and npm installed on your machine.
Clone this repository:
git clone https://github.com/harrycresswell/eleventy-starter.git
Then install the required dependencies:
npm install
To start a local development server run:
npm start
Now you can preview the project by visiting http://localhost:8080
in the browser.
To build a production ready website to ._site
run:
npm build
This will clean the ._site
directory and rebuild it ready for deployment.
Write your scss
in .src/scss
.
With a local development server running, onchange will watch for any changes you make to your scss
files and compile them to .src/site/_includes/css/main.css
.
Eleventy handles live reloading, so no need for anything like browsersync.
Create new partials and templates in .src/site/_includes
.
Create new posts in .src/site/posts
.