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/icons
and use them. - Server: Node.js code for easy, gzipped, and secure static website hosting.
- Prepare a coffee
- Run:
npm i
to install the dependencies - Update the
deploy
script insidepackage.json
file and replace[S3-BUCKET-ID]
and[CF-DISTRIBUTION-ID]
with corresponding values - Run:
npm run dev
to build and watch - Start coding!
- Run:
npm run build
to build the project - Run:
npm run deploy
to 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.js
for the sitemap. Add the corresponding file path to thepaths
array.
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