Build static websites with 11ty, Sass for CSS, and modern JavaScript.
Comes with a Netlify deploy config, but can be hosted anywhere.
$ npm i$ npm run watch$ npm run buildOr build production ready assets:
$ npm run build-prodThere are also a slew of individual commands to run individual build processes such as styles, scripts, etc.
First, enable your airleventy fork on Netlify's interface.
When prompted, clear the build and publish fields (that's what your netlify.toml is for). Then set your deploy branch (e.g., main).
Now each time you push to your deploy branch you'll also deploy your most recent changes. 🎉
Adding JS is pretty straightforward, but has prescriptions on file structure & naming:
- All JS is processed through rollup with a basic Babel configuration using
preset-env. Configure this and the accompanying.browserslistrcas you please. - Any JS file without an underscore prefix is treated as an asset (included in file output). Its file path is mirrored in the output.
- Any JS file with an underscore prefix is treated as a non-asset module (no output file).