Let’s take a look at what docs as code looks like in practice.
The basic steps on a Mac are:
- 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.
- Clone a repository that contains a Jekyll theme that you like. We’re using the so-simple theme here.
- Switch to the cloned git directory.
bundle installto install the required gems.
bundle exec jekyll serveto serve the content from a local web server.
- 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.