title |
---|
How to run the site locally |
-
Install Ruby (recommended version 3.1.x)
- On macOS with rbenv:
rbenv install 3.1.4
- Set it as your local version:
rbenv local 3.1.4
- On macOS with rbenv:
-
Install Jekyll and Bundler
gem install jekyll bundler
-
Install Node.js and yarn
npm install --global yarn
- Install project dependencies:
bundle add webrick # Add webrick dependency (required for Ruby 3.x) bundle install # Install Ruby dependencies yarn install # Install Node.js dependencies
yarn start
- Open the site at
http://localhost:4000
The above command runs everything, but if you need to run things separately:
-
bundle exec jekyll serve --livereload
Optionally add the
--verbose
flag to see more information. -
yarn run watch:css
(only needed if modifying CSS)
bundle exec jekyll clean
bundle exec jekyll build JEKYLL_ENV=production
You can serve the build site locally with ruby -run -e httpd docs -p 4000
If you see "jekyll: command not found", make sure you:
- Have Ruby installed and selected the correct version with rbenv
- Have run
gem install jekyll bundler
- Have run
bundle install
If you're having dependency issues, try these steps:
- Install Ruby 3.1.4:
rbenv install 3.1.4
- Switch to Ruby 3.1.4:
rbenv local 3.1.4
- Install latest compatible bundler:
gem install bundler
- Reinstall dependencies:
bundle install
If you see an error about "cannot load such file -- webrick", run:
bundle add webrick
bundle install