GitHub Pages light approach

  1. Create a new empty repo.
  2. Go to the Settings of repo.
  3. Go to the GitHub Pages section.
  4. Choose your main branch and enable.
  5. Choose a theme, using one of two approaches.
    • Use the GitHub UI - change theme on the current section of Settings. This will create a config file and README.md file (warning: this will overwrite an existing README.md, which happened me).
    • Create a config file manually, then add theme astheme: NAME or remote-theme: USER/NAME.
  6. Optionally create an index.md file.

CLI

Whatever approach you use, pay attention to whether you have Jekyll 3 or 4.

Use global

If you have Jekyll installed globally.

$ jekyll new my-site
$ cd  my-site

Use existing project

If you have Jekyll in an existing project, you can use that.

$ cd my-site-a
$ bundle exec jekyll new ~/repos/my-site-b
$ cd ~/repos/my-site-b

Use project Jekyll from scratch

This does not require Jekyll globally or installed in any existing projects locally.

This flow sets up a Jekyll site with no content but just the sufficient gems, at the project scope in vendor.

Then that project-level Jekyll is used to make a new Jekyll scaffolded repo using the CLI, overwriting the content of the current directory, which are no longer needed.

See gist.

Use a template

Jekyll 3 blog

  1. Go to this repo:
  2. Click the Use this template button to get a repo.
  3. Follow the repo’s docs to set up Jekyll locally and on GitHub Pages.

Jekyll 4 and GitHub Actions

If you’re interested in Jekyll 4 specifically.

  1. Go to this repo:
  2. Click the Use this template button to get a repo.
  3. Follow the repo’s docs to set up Jekyll locally and on GitHub Pages.
    • You just need to enable your site under GitHub Pages under Settings.
    • GitHub Actions will already be configured for you. You don’t even have to set a token.

Jekyll 4 and Netlify

The above template also will work on Netlify.

Delete the GitHub Actions workflow and set up a Netlify config - see this Jekyll Netlify recipe.