Skip to content

Instantly share code, notes, and snippets.

@GammaGames
Last active May 22, 2020 00:23
Show Gist options
  • Save GammaGames/f3c5b6467d7602afcc2629f782142fdf to your computer and use it in GitHub Desktop.
Save GammaGames/f3c5b6467d7602afcc2629f782142fdf to your computer and use it in GitHub Desktop.

Basic

  1. Create a new repo (gp-pages-simple)
  2. Go to settings
  3. Choose a theme
  4. Edit your index.md file
  5. Commit to master branch
  6. Go to username.github.io/gp-pages-simple

http://jekyllthemes.org/

Custom Theme

  1. Create new repo (gp-pages-themed)
  2. Create new file (_config.yml)
  3. Add a theme (remote_theme: murraco/jekyll-theme-minimal-resume), commit
  4. Create new file (index.md), commit
  5. Go to settings
  6. Choose "master" branch as gh pages source
  7. Wait a minute (can check progress with icon next to repo name), then load page

Custom theme and site

  1. Create new repo (gp-pages-custom)
  2. Clone repo to computer
  3. Download theme repo as zip (need v3 branch: https://github.com/poole/hyde/tree/v3)
  4. Extract into repo
  5. Install prereqs (https://help.github.com/en/github/working-with-github-pages/testing-your-github-pages-site-locally-with-jekyll)
  6. Edit _config.yml file
  7. Edit _includes/sidebar.html to change the text
  8. Remove a few posts
  9. Edit one of the posts to have custom content
  10. Add foo.md to root directory
  11. Add the text:
---
layout: page
title: foo
---

### Bar
  1. Commit changes
  2. Push to repo
  3. Settings, use master branch
  1. Install WSL Ubuntu 18.04 (20.04 doesn't have the ruby packages yet)
  2. Follow this guide: https://jekyllrb.com/docs/installation/windows/
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.5 ruby2.5-dev build-essential dh-autoreconf
gem update
gem install jekyll bundler
  1. Run the commands in this answer: https://stackoverflow.com/a/50361633/3903479
mkdir ~/.ruby
echo 'export GEM_HOME=~/.ruby/' >> ~/.bashrc
echo 'export PATH="$PATH:~/.ruby/bin"' >> ~/.bashrc
source ~/.bashrc
  1. cd to the repo
  2. Run the following:
bundle init
bundle add jekyll jekyll-paginate jekyll-gist
  1. Serve the site (may have to restart if getting permission issues):
bundle exec jekyll serve

https://help.github.com/en/github/working-with-github-pages/testing-your-github-pages-site-locally-with-jekyll

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