Starting a Jekyll Blog on GitHub Pages
[github-pages
jekyll
]
After only a couple of hours this is actually up and running. The main hurdle for setting up GitHub pages is gathering all the little bits and pieces together. In that sense it is more a quick succession of tiny hurdles than any one large creative leap.
To get started on this you are going to need to do a few things. Some of these are dependant on your setup so I have listed the sub-steps that also need to be taken. This is all written from the perspective of macOS.
Workflow
Pages Repository = USERNAME.github.io
repository
- Setup GitHub Pages
- Get a GitHub account
- Create a pages repository
- Clone Pages repository to your computer
git clone https://github.com/username/username.github.io
- Download GitHub Desktop
- Clone Pages repository to your computer
- Create a Jekyll Site in your Pages Repository with Terminal:
- Install Jekyl Bundler
gem install jekyll bundler
- Install xcode tools:
xcode-select --install
- install/update ruby:
\curl -sSL https://get.rvm.io | bash -s stable
rvm install ruby-2.4
- update RubyGem:
gem install rubygems-update
- Install xcode tools:
- change directory to the location of Pages Repository
- type
jekyll new .
- Install Jekyl Bundler
- _If you want to use a custom domain_
- Register your domain name
- In Pages Repository: go to settings and change custom domain to
www.yourdomain
- yourdomain is the domain name you have registered
example.com
,example.io
,example.co.uk
- yourdomain is the domain name you have registered
- Create a
CNAME
record on the site of the company with whom you registered your domain - When altering the
CNAME
record, change the following- host:
www
(or something likeblog
) - points to:
github_username.github.io
- host:
With the install of all the command line tools and updating packages, it could take a while to get this all finished.
Run server and test site with bundle exec jekyll serve