Free site with custom domain in 10 minutes with Jekyll & GitHub Pages
Follow this walk-through in video format
Prerequisites
- GitHub Account: https://github.com/
- GitHub Desktop: https://desktop.github.com/
- Homebrew: https://brew.sh/
Install Ruby 3.0 and Jekyll on macOS
In Terminal:
brew install ruby
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="$(gem env gemdir)/bin:$PATH"' >> ~/.zshrc
Note: Older versions of MacOS use Bash instead of ZSH. If this case, use ~/.bash_profile
instead of ~/.zshrc
.
Open a new Terminal window! (Close the old one.)
gem install jekyll bundler
Create a GitHub repo as a Jekyll site
In Terminal, in the repo directory:
jekyll new .
bundle add webrick
Test your site locally
In Terminal, in the repo directory:
jekyll serve --livereload
Connect your domain name
In Terminal, in the repo directory:
echo 'mydomain.com' > CNAME
DNS records:
ALIAS Record @ myusername.github.io.
CNAME Record www mydomain.com.