This is an introduction to using Jekyll and GitHub Pages as a static page generator to help people who aren't web devs, be web devs.
This guide is constructed assuming you are developing on a Windows based platform.
- You have some familiarity with the command line and command line tools.
- You have some familiarity with git and GitHub.
- Ruby for Windows and Ruby DevKit.
- Git for Windows.
- Text editor (I prefer VSCode).
- Install Ruby by running the exe, using the default install options is fine.
- Extract the Ruby DevKit (the exe is self extracting).
- Edit the dk.rb so it will work with x64 installations.
- add
'Software\Wow6432Node\RubyInstaller\MRI',
to the enumerated registry keys (line 14) so x64 instances of Ruby can be found.
- add
- Initialize the Ruby DevKit installation.
ruby dk.rb init
- Install the Ruby DevKit.
ruby dk.rb install
- Install the Bundler and Jekyll gems.
gem install jekyll bundler
- Instructions for configuring the git client can be found here.
- Create a GitHub repository.
- Option A: Create a repository for your GitHub UserName root page IE https://dotps1.github.io.
- Name the repository
<GitHubUserName>.github.io
. - All the source files can live in the
master
branch with this option.
- Name the repository
- Option B: Create a repository that would be a web path under your GitHub UserName root page IE https://dotps1.github.io/Jekyll.
- Name the repository whatever you want the web path to be called, IE
Jekyll
. - Create a new branch in the repository called
gh-pages
.
- Name the repository whatever you want the web path to be called, IE
- Option A: Create a repository for your GitHub UserName root page IE https://dotps1.github.io.
- Clone your repository.
git clone https://github.com/<GitHubUserName>/<GitHubUserName>.github.io
orgit clone https://github.com/<GitHubUserName>/<Repository>
- Change directory into your cloned repository.
cd .\<Repository>
- If you are doing option B from step 1, switch to the
gh-pages
branch.git checkout gh-pages
- Create your website.
jekyll new . --force
- Edit the
_config.yml
.code .\_config.yml
- Build and run locally to see how its going!
bundle exec jekyll serve
- Browse to the server address from the output in your shell,
http://127.0.0.1:4000/Jekyll/
.
- Once your happy, push the site to GitHub!
git add .
git commit -a -m "Publishing my blog!"
git push