A foundational static site generator using 11ty.
Includes:
- SCSS
- Javascript modules
- CSS and JS linting
- Netlify deployment
- Use this template to generate a version in your own Github repo, or clone this locally and manually add to your remote repo.
- Run
npm i
- Run
npm start
- View your project on
localhost:8080
- Work in the
src
folder unless you need to adjust development configurations in.eleventy.js
package.json
or any other root file. - SCSS lives in the
css
folder and processes toapp.css
in thedist
folder. - JS lives in the
js
folder and processes toapp.js
in thedist
folder. - The
static
folder is for images, fonts, and other media. index.njk
is your root page. You can add other partials to this. And make sub-pages. Read up on Nunjucks and 11ty collections.- You can change to any other templating language that 11ty supports if you don't want to work in njk.
- Data can be passed to njk files and is stored in the
_data
folder. Currently the only file there ismetadata.json
that is being passed into thehead
in_includes/layouts/base.njk
.- Read up on frontmatter to pass data to your templates within each page.
- Run
npm run build
- All build files should end up in the
dist
folder