Learning Something New: Jekyll
This post is about how I set up this Github hosted site using Jekyll on Windows 10. Jekyll is not officially supported on Windows, but it’s totally possible to get it to work. I’m writing this up because I could not find one single place that explained how to start from ground level.
- Use Windows Subsystem for Linux (WSL) for development.
- Use the Tale theme developed by Chester How.
- Support local preview with Jekyll.
If you haven’t already, enable WSL from a Powershell with administrator privileges.
Fork the Tale theme to a repo named
Then clone it locally.
Install Ruby v2.6.5
I needed a newer version of Ruby, v2.6.5, than I could readily get from Ubuntu Apt.
Install bundler gem for the user. I am deliberately installing to the user, because I don’t like the idea of installing a bunch of gems to the system. However this means that we have to use some additional commandline arguments in subsequent steps.
Add local gem executables to PATH
Jekyll does the work of creating the site. How it works with GitHub is explained in more detail in Setting up a GitHub Pages site with Jekyll.
Go to the directory where you cloned the website repo.
Gemfile file to look like this:
Install required packages, including Jekyll.
bundle install --path ~/.gem
Ready to rock
Run the local Jekyll preview.
bundle exec jekyll serve
You should be able to connect to http://127.0.0.1:4000 and see your website.
Stage and commit your changes. Push to GitHub, and your website will be available in a few minutes.
If you want to render equations, you need MathJax. Follow the instructions in this blog entry: Adding MathJax to a GitHub Pages Jekyll Blog