Building a Personal Website�with Jekyll & GitHub Pages
Lauren Burke
Intro & Agenda
Hi, I’m Lauren!
Agenda
Background
Section 1
Why Create a Personal Website/Blog?
Establish a Personal Brand
Build a Portfolio
Gain Visibility
Showcase Your Accomplishments
Share Knowledge
What are Jekyll & GitHub Pages?
Why use Jekyll/GitHub Pages?
Creating Your Site
Section 2
Prerequisites
To get started, you will need to have:
Getting Started
Option 1: Use a Template
Option 2: Start from Scratch
Install Jekyll
1) Ensure Ruby is Installed
Jekyll is a Ruby gem. Gems are similar to plugins, but installed at system level instead
of application level.
2) Install Bundler
Bundler is a package manager for Ruby gems.
3) Install Jekyll
gem install bundler
gem install jekyll
ruby -v
Create a New Jekyll Project
1) Navigate to the directory to hold your site.
I will be using: /Documents/Github/
2) Create a new Jekyll project in the current
directory using the jekyll new command:
In this case, I’ve created a new project named
myblog at path: /Documents/GitHub/myblog
3) Navigate into the newly created folder.
jekyll new myblog
cd myblog
cd Documents/Github
Run Your Site Locally
1) Install dependencies using the bundle install command:
2) Run your site locally:
bundle install
bundle exec jekyll serve
Tip: Bundler may throw an “cannot load such file” error due to it missing certain required gems. If this occurs, run command bundle add MissingGemName then try to serve the site again.
What’s Inside the Project?
Updating Site Configuration
1) Edit the _config.yml file in your project
directory to add information about
your site like the name, email,
description, and social links.
2) After saving the file, run the serve
command once again to view the
updates.
bundle exec jekyll serve
Hosting on �GitHub Pages
Section 3
Initialize the Repository
1) Within GitHub, create a new repository
with the name <username>.github.io.
Do not add any files!
git init
2) Back in your terminal, initialize the git repository in your project’s root directory.
Add the GitHub Pages Gem
1) Edit the Gemfile that Jekyll created in the project
folder. You can do so using any text editor.
Comment out the line with the jekyll gem, and
add the github-pages gem.
2) Then, update the Gemfile by running the
bundle update command.
bundle update
Tip: Bundler may throw an error when attempting to install the required jekyll-feed gem. If you run into this issue, delete the Gemfile.lock file then run bundle install.
Personal Access Tokens (PAT)
In 2020, GitHub changed their authentication process from password-based to token-based.
Generating a PAT
Push to GitHub
In terminal, use your PAT to set the remote GitHub repository.
git remote add origin https://<PERSONAL_ACCESS_TOKEN>@github.com/<username>/<username>.github.io.git
Add all changes and commit them.
git add .
git commit -m “Initial Commit”
git remote -v
git push origin master
Verify the remote repo.
Push the changes to the remote repo.
View on GitHub Pages
GitHub Actions
Deployment
Customization�Options
Section 4
Theme
Section 4.1
Theme
Option 1: GitHub Pages offers a number of supported themes.
Option 2: Use a remote theme. Here we will install Minimal Mistakes as a remote theme.
Update _config.yml
Update _config.yml
Viewing the Updated Theme
1) First, serve the site and view the
updates locally:
bundle exec jekyll serve
2) Then add, commit, and push
the changes to view the updated
theme on GitHub Pages.
Color Scheme
Change the color scheme by setting the minimal_mistakes_skin variable in the _config.yml file.
After making any changes to the site configuration, use bundle update followed by bundle exec jekyll serve to update the site.
Update theme in _config.yml
Posts & Pages
Section 4.2
Posts
Front Matter
Ex. Post’s front matter
Ex. Page’s front matter
Pagination
Pages
Menus & Navigation
Section 4.3
Site Author Profile
Add a site author profile by updating the _config.yml file.
In _config.yml, add an author profile…. then update default format
Site Footer
Navigation Options
Custom Sidebars
Option 1: Add sidebar to single page/post
Add to navigation.yml
Option 2: Add to all pages/posts
Blog Settings
Section 4.4
Home Page Content
Separate Blog Page
If you’d prefer to have a standard homepage, you can update the layout and display your blog on another page.
Categories
Why use Categories/Tags?
About Categories & Tags
Tags
Adding Categories & Tags
Other Customizations
Thank you!
Feel free to connect or reach out with questions!
@lauren_e_burke
@laurburke
laurburke.github.io
Talk References
site: https://laurburke2.github.io
repo: https://github.com/laurburke2/laurburke2.github.io