Skip to content

Instantly share code, notes, and snippets.

@jcleary
Last active December 10, 2021 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcleary/aab4ede5b0390d9a69da48f0b501a656 to your computer and use it in GitHub Desktop.
Save jcleary/aab4ede5b0390d9a69da48f0b501a656 to your computer and use it in GitHub Desktop.

Create a repo

Create a new repo to host your blog site, call it "blog" https://github.com/new

Clone the theme

Using this theme: https://jekyllthemes.io/theme/forty-jekyll-theme

In your terminal:

git clone git@github.com:andrewbanchich/forty-jekyll-theme.git blog

cd blog
git remote remove origin
git remote add origin git@github.com:<your-guthub-username>/blog.git
git push origin master

Setup a Personal Access Token

Go to this address and create a PAT - doesnt matter what you call it. Make sure it has access to all of "repo" https://github.com/settings/tokens

Add the token to your repo

  • Go to GitHub | <Repo> | Settings | Secrets
  • Add a repository secret called JEKYLL_PAT and paste in your secret from before

Working Locally

add docker-compose.yml

Add a docker-compose.yml to the root of the blog project

version: '3'

services:
  jekyll:
    image: jekyll/jekyll:4.2.0
    command: jekyll serve --watch --incremental
    ports:
      - 4000:4000
    volumes:
      - .:/srv/jekyll:cached

Docker/Jekyll commands

To start Jekyll, type docker compose up

To force a rebuild docker compose exec jekyll jekyll build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment