How to Build a Blog Like This: Deploy
This is the third post of a series, you might want to check the previous articles: (Intro and Content) before reading this.
Since we only have static files, we only need a simple web server to serve the site. It can be self-hosted or hosted on a cheap Webhosting solution and there are other cool options, like:
Hosting
I choose GitHub Pages because it is
- Free
- Easy to use
- I’m using GitHub to manage the source and I can serve the site from the same repo
- Supports automation via GitHub Actions
- Supports custom domains with HTTPS using Let’s Encrypt
- Places the site behind a CDN which has DoS protection
If you haven’t heard about CDN, CloudFlare has a good and not too long article about it.
Putting it together
There are two things you need to set-up:
CNAME
file (GitHub creates it for you)- A few DNS records
Check out the documentation for the details:
GitHub can also create a certificate using Let’s Encrypt.
A few things to check after your site is up
- Valid cert
sitemap.xml
(see sitemaps.org)robots.txt
(see robotstxt.org)- RSS:
index.xml
(see wiki) - Google Analytics?
- Disqus?
- favicon