The boilerplate is an opinionated folder structure to help you kick-start your html project. It includes the necessary build tools and configurations and is easily extendable.
- Node.js: for all the magic
- Bootstrap 5: Bootstrap's normalize, grid system, and utility classes are imported by default.
- Webpack: With babel, allows you to use ES6 code and modules.
- Handlebars: Build your html with partials.
- SVG sprites: Add your icons in
assets/iconsand use them. - Server: Node.js code for easy, gzipped, and secure static website hosting.
- Prepare a coffee
- Run:
npm ito install the dependencies - Update the
deployscript insidepackage.jsonfile and replace[S3-BUCKET-ID]and[CF-DISTRIBUTION-ID]with corresponding values - Run:
npm run devto build and watch - Start coding!
- Run:
npm run buildto build the project - Run:
npm run deployto deploy changes to the S3 bucket and optionally invalidate AWS CloudFront cache
- To add a new page to the site, you must add the mapping in
webpack.config.jsfor the sitemap. Add the corresponding file path to thepathsarray.
The following is an example to adding a contact-us page:
const paths = [
'index.html',
'about-us/index.html',
'support/terms/index.html'
];- Use realfavicongenerator.net to generate the favicon and metadata
The boilerplate includes a built in linter configuration:
npm run lint