Netlify is a service where you can deploy static sites (HTML/CSS/JS) for free. Here are steps on how to get started.
First, be sure that node.js is installed. (nvm is a good way to install node.) Create an account on Netlify.
$ node -v
v10.14.0
Then install netlify-cli:
$ npm install -g netlify-cli
If you want more privacy, turn off tracking:
$ netlify --telemetry-disable
Create a directory for your project that has a public
directory inside of it. Put any files that you want to deploy to your website (the HTML, CSS, and JS) into public
:
$ tree
.
βββ css
β βββ main.css
βββ images
β βββ kitten.gif
βββ index.html
βββ js
βββ main.js
Then type this command to log in to netlify:
$ netlify login
When youβre ready to deploy, type this:
$ netlify deploy
It will give you a secret, staging URL where you can preview your site. If that looks good, type this to deploy to production:
$ netlify deploy --prod
Then go to netlify.com and configure settings for the new site. You can add a custom domain, add AWS Lambda functions, create forms, and add redirects and headers.