-
Install Ruby.
brew install ruby
-
Ruby installations are not symlinked to
/usr/local
because macOS already provides a (much older) ruby installation. You have to update your$PATH
to put the Homebrew Ruby installation ahead of the default macOS installation.export PATH="/usr/local/opt/ruby/bin:$PATH"
-
Install the dependencies. The
github-pages
gem is a wrapper around all of the gems made available to GitHub Pages.bundle install
-
Build the site and watch for changes. Using
bundle exec <cmd>
here ensures that you're using thejekyll
version specified bygithub-pages
.bundle exec jekyll serve
If you would like to set up deployment to an S3 bucket you can use the s3_website gem to handle the deployment. Once you have a bucket set up to host a static site and you have s3_website
installed on your machine you can simply run:
AWS_PROFILE=profile S3_BUCKET=bucket s3_website push
Where profile
and bucket
are the appropriate values for your account/bucket.