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
yarn
- Run
npm start - View your project on
localhost:8080
- Work in the
srcfolder unless you need to adjust development configurations in.eleventy.jspackage.jsonor any other root file. - SCSS lives in the
cssfolder and processes toapp.cssin thedistfolder. - JS lives in the
jsfolder and processes toapp.jsin thedistfolder. - The
staticfolder is for images, fonts, and other media. index.njkis 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
_datafolder. Currently the only file there ismetadata.jsonthat is being passed into theheadin_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
distfolder
Deploy to Netlify using this template or manually connect to your Netlify account with the repository you've set up. The configuration lives in netlify.toml and you can make it fancier if you like.