Let’s take a look at what docs as code looks like in practice.

The basic steps on a Mac are:

  1. Make sure you have all the pre-requisites set up for Ruby, Jekyll, and Bundler. Set up GitHub Pages locally as instructed in the excellent GitHub documentation.
  2. Clone a repository that contains a Jekyll theme that you like. We’re using the so-simple theme here.
  3. Switch to the cloned git directory.
  4. Run bundle install to install the required gems.
  5. Run bundle exec jekyll serve to serve the content from a local web server.
  6. Copy and paste the http://127.0.0.1:4000/ URL into your web browser.

This video shows you how to clone a GitHub repo with an existing Jekyll theme and build it locally.

How it’s made