These are the steps to setup this jekyll site repository on a Mac. All the code snippets are to be run in the terminal.
Install Github Command Line Interface
The Github CLI is a command line interface for the Github API. It is used to create and manage repositories. It is also used to create and manage issues and pull requests.
# Install Github CLI
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh
Confirm that you have installed the Github Command Line Interface by running the following command:
# Confirm Github CLI installation
Login to gh cli using your github credentials
# Login to gh cli
gh auth login
Install Software Packages (optional)
# Navigate to your home directory and clone the brewfile
gh repo clone bamr87/apt ~/.apt
# Navigate into brew file repo and install packages
apt bundle --file bundles/core/
Install VS Code
VS Code is a text editor that integrates well with Github. It is a free and open source software editor.
#install VS Code via Homebrew
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
Then update the package cache and install the package using:
sudo apt install apt-transport-https
sudo apt update
sudo apt install code # or code-insiders
Log into VS code using your github account by clicking on the Account icon on the bottom left of the VS code window.
Jekyll & ruby Setup
Ruby is the programming language of choice for Jekyll, and also manages the dependencies for the Jekyll gem.
# Install Ruby
sudo apt-get install ruby-full build-essential zlib1g-dev
Add Ruby to PATH
After install, you need to add the executables to your PATH. Otherwise, you will not be able to run Ruby or Jekyll.
First check which terminal shell you are using:
# Add Ruby to your PATH if you're using Zsh
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
Once Ruby is installed, you can install Jekyll. First exit the terminal and open a new terminal to initialize the new PATH variable.
# Install Jekyll and Bundler
gem install jekyll bundler
Verify that Jekyll is installed
# Verify Jekyll is installed
Fork Github Repository
Now you can fork the repository from Github and start working on it.
# Navigate to your home directory, create a github folder, and fork the github repo
gh repo fork bamr87/it-journey
Once the repo is installed, you can install the dependencies for the Jekyll gem.
# Navigate to your github repo and install dependencies
Build Jekyll site
To build the Jekyll site, you need to run the following command:
# Build Jekyll site
Start Site locally
To start the site locally, you need to run the following command:
# Start Jekyll site locally