Previewing the site locally
The https://csc-training.github.io/csc-env-eff site is built using Jekyll and the Just the Docs theme. When developing new material (e.g. tutorials), it is useful to build the site locally to preview the changes.
Step 1. Install Jekyll
In order to build the site locally, you need to first install Jekyll on your own computer. Detailed instructions for different operating systems are available in the Jekyll documentation.
For Ubuntu 22.04, the steps are as follows:
Jekyll is a Ruby gem, so install Ruby and other prerequisites.
Edit your
~/.bashrc
file to configure a local gem installation directory for your user.Install Jekyll and Bundler (used to manage and run gems).
Step 2. Build the site locally
Open a Terminal.
Clone the csc-env-eff git repo.
In the root directory, build the site and serve it on a local server.
Note: When doing this the first time, you will likely get an error about missing dependencies. Install them all.
You might also get another error if you've installed Ruby v3.0.0 or newer. These versions do not ship with
webrick
and the solution is to add it to your dependencies manually.Re-run the
bundle exec jekyll serve
command and browse to http://localhost:4000 to view the site.