Skip to content

Instantly share code, notes, and snippets.

@HereOrCode
Created April 13, 2022 06:33
Show Gist options
  • Save HereOrCode/2741ee449bb6379629511f5a8ce12f60 to your computer and use it in GitHub Desktop.
Save HereOrCode/2741ee449bb6379629511f5a8ce12f60 to your computer and use it in GitHub Desktop.
Make your own blog with Jekyll

Building a website nowadays is not as hard or expensive as it was in the past. These days, you do not have to learn a crazy programming language to have your site up and running.

Install Jekyll

# First install rbenv
brew install rbenv

# Second install ruby 2.7
# Why, detaill see: https://talk.jekyllrb.com/t/error-no-implicit-conversion-of-hash-into-integer/5890
rbenv install 2.7.4

# If you're using Zsh
echo 'export PATH="$HOME/.rbenv/versions/2.7.4/bin:$PATH"' >> ~/.zshrc

# If you're using Bash
echo 'export PATH="$HOME/.rbenv/versions/2.7.4/bin:$PATH"' >> ~/.bash_profile

# Install ruby 2.7.4
rbenv global 2.7.4

# Check your gem version
gem --version

# Restar your terminal, then
gem install --user-install bundler jekyll

Creating a Site

# Jekyll Tutorials: https://jekyllrb.com/tutorials/home/
jekyll new MyBlog

GitHubRepo Setting

Create a repository, the repo name is {username}.github.io

Add your site to the repo, detail see

Setting the GitHubPage:

wR4w8T

Load error: cannot load such file – webrick

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