Setting up a blog
This is the first blog post describing getting the blog up and running.
Setup
This blog uses the following tools and technologies.
GitHub pages
These are a way of hosting web pages from public GitHub repositories. The repository either needs to be named in the format username.github.io
(like this one), or you can choose GH pages publishing options in the repository settings. Change.
You could combine code and documentation repositories by publishing just a subdirectory as a set of GH pages (e.g. a docs
directory).
GH pages are also a really good way of hosting JavaScript framework applications e.g. React, Angular, or Vue.Js. One branch could hold the code, while another branch holds the built application, and is published online.
Jekyll
This is a static site generator which can build HTML from markdown files. GH pages support Jekyll, and will rebuild a static site when changes are committed to the repo.
Minimal mistakes
There are many free Jekyll themes. This is one of the most popular, and supports GH pages ‘remote themes’. This means the theme files can remain on a remote repository, to keep your own repository simple. If using GitHub, just copy or fork the contents of this repository.
Custom domain
By default, Github pages sites use github.io
domain names. By pointing a DNS record to GitHub servers, a custom domain can be used instead. The name is then added to the repository settings.
StackEdit.io
This is an online markdown editor. It can point to GitHub repositories, providing an easy way of creating and editing content.
Cloudflare
GitHub provides SSL by default, but if using a custom domain an name then an alternative option needs to be used. Cloudflare is a free option for adding SSL to your custom domain.
If you own a domain name you will need to change your DNS nameservers to use Cloudflare ones, and then use Cloudflare to point the DNS to GitHub servers. CF will automatically migrate existing DNS records to make this process easier.
Summary
The setup took a couple of hours. No software is required, and aside from the cost of a domain name, the site is fast and free to run.
The repository for the blog is located at https://github.com/davebathnes/davebathnes.github.io.