When you are initially working your website, it is very useful to be able to preview the changes locally before pushing them to GitHub. To work locally you will need to:
- Clone the repository and made updates as detailed above.
- Make sure you have ruby-dev, bundler, and nodejs installed:
sudo apt install ruby-dev ruby-bundler nodejs
- Run
bundle install
to install ruby dependencies. If you get errors, delete Gemfile.lock and try again. - Run
jekyll serve -l -H localhost
to generate the HTML and serve it fromlocalhost:4000
the local server will automatically rebuild and refresh the pages on change.