Instructions for getting a Jekyll project bootstrapped, starting from a clean machine.
See also: Creating your site on GitHub.
brew install ruby@3.2
PATH
VariableAdd /usr/local/opt/ruby@3.2/bin
and /usr/local/lib/ruby/gems/3.2.0/bin
before /usr/bin
rbin=/usr/local/opt/ruby@3.2/bin
gbin=/usr/local/lib/ruby/gems/3.2.0/bin
PATH=/usr/local/bin:$rbin:$gbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
. ~/.bashrc
type gem ruby
gem install bundler jekyll
--skip-bundle
to postpone downloading Gems--force
to overwrite existing files w/ same name as source.
to install to current dircd some-dir
jekyll new --skip-bundle --force .
Gemfile
These changes are for GitHub Pages. The current version of github-pages
is at
Ruby Gems.
#gem "jekyll", "~> 4.3.2"
gem "github-pages", "~> 231", group: :jekyll_plugins
bundle install
_config.yml
Here, making an explicit reference to the unspecified theme “primer” used by GitHub Pages.
Also setting title
.
title: "Some Website" # defaults to project dir name, seen in <title> and page header
remote_theme: pages-themes/primer@v0.6.0
plugins:
- jekyll-feed
bundle add webrick
rlib=/usr/local/opt/ruby@3.2/lib
DYLD_LIBRARY_PATH=$rlib bundle exec jekyll serve --livereload
Make sure the following vars in _config.yml
are set:
# set these to deactivate metadata lookup
github: []
title: "jeberle.github.io"
description: ""
url: "" # the base hostname & protocol for your site, e.g. http://example.com
baseurl: "" # the subpath of your site, e.g. /blog
For actual lookup (and to resolve the GitHub Auth warning), create a GitHub token here https://github.com/settings/tokens. The only required auth is “access to public repos”. Then:
export JEKYLL_GITHUB_TOKEN='<token-string>'
The plugin is part of github-pages and so is baked in. https://jekyll.github.io/github-metadata/