The barest minimum.
Install Pandoc if necessary, then:
bin/build.sh
The built site is in the build
directory.
Install Python if necessary, then:
cd build
python3 -m http.server
Test by going to http://localhost/
Use Netlify to serve a static site from a repo on github/gitlab/bitbucket.
- Add a new site.
a. Import an existing project: connect to the repo.
b. Authorize configuration on Github.
c. Basic build settings on netlify form:
- Base directory: leave blank (means toplevel of repo)
- Build command:
bin/build.sh
- Publish directory:
build
- Click "Deploy Site" and wait for the site to be updated automatically.
Test by going to the site given by Netlify (like https://distracted-goldfish-ab4928.netlify.app
).
- Choose a domain for the site (like
foo.net
). Buy a domain from Namecheap if you want. - Go to the DNS provider (same as the domain registrar unless specified differently).
- Go to Advanced DNS settings and add a new DNS record for
www
. a. type: CNAME b. hostname:www
(or whatever host you want for the site page). c. the hostname from Netlify (will end in netlify.app). Remove thehttps://
and the trailing/
. - Add a DNS record to redirect the bare site (like https://foo.net, without any
www.
) to thewww
site. a. type: URL Redirect b. hostname:@
(this means bare site) c. target:https://www.foo.net
- Configure Netlify to handle
www.foo.net
. a. "Domain Settings" b. "Add custom domain" - Enable
https
: press the button on Netlify to provision an SSL certificate.
Test by going to your own site (like https://foo.net).