How To Install Jekyll on WSL 2

The Static Site Generator Used by GitHubIntroductionPhoto by Jay S on UnsplashTable of contentsIntroductionPerquisitesAll this just to install RubyNow we Just have to install JekyllWhat should I do now?In this tutorial, you will configure Windows 10 to…


This content originally appeared on Level Up Coding - Medium and was authored by Jordan Nash

The Static Site Generator Used by GitHub

Introduction

Photo by Jay S on Unsplash

Table of contents

Introduction
Perquisites
All this just to install Ruby
Now we Just have to install Jekyll
What should I do now?
  • In this tutorial, you will configure Windows 10 to use the Jekyll SSG (Static Site Generator) on WSL 2 (Windows Subsystem for Linux).
  • If you do not want to install Linux or in a virtual machine just to use Jekyll, then the good news is you can use WSL on Windows!
  • To do this you will have to install Node.js and Ruby in WSL.
  • Should you bother? Only if you are new to blogging and do not already use a Content Management System that does you well.
  • As I said it is used by GitHub to help the company easily generate content without them having to rely on creating HTML p tags for every single paragraph. What is the fun in that anyway?
  • Also, the instructions for installing Jekyll on the official Jekyll website for WSL 2 are out of date hence the reason for this article.

Jekyll was the first static site generator I ever used as Github uses it for its site. The knowledge I have accumulated has been written down into the blogs it helped transform into raw HTML which I do not have to worry about.

After I wrote several blogs and even got some referenced by big tech companies I can see why Github uses it. It is 10 times better than if you manually create every single HTML paragraph tag which was exactly what I used to do.

The very page I am using was originally a Markdown page, transformed into HTML with Jekyll. I just exported the bulk of the content and tweaked it here and there on Medium.

Distro used: I used Ubuntu 20.04 (Focal) as Ubuntu 22.04 (Jammy) isn’t compatible with the Brightbox Personal Package Archive or ppa:brightbox/ruby-ng which will need to install the Ruby language which Jekyll runs on.

Perquisites

You should be quite comfortable with HTML and some basic Linux terminal navigation. You should already have installed WSL 2. If not you need to go to the Windows docs to learn how.

Used the below libraries, please do NOT install them just yet:

jekyll 4.2.2
node v10.19.0
rbenv 1.2.0-16-gc4395e5

I honestly just attempted to install the latest versions.

All This Just To Install Ruby

Unfortunately, the installation is probably the hardest thing about setting up Jekyll. Everything else is a bit of practice.

Credit goes to the user known as Jimmy. Advise, the version of Node.js he uses is outdated. So I have used the latest version of Node.js as shown in my Gitgist.

Now We Just Have To Install Jekyll

Jekyll should now be installed. You can check that with the commandjekyll -v which should return a version number underneath. Else you may have to reinstall everything. Just be sure not to purge any packages unless needed. May consider backing up Windows beforehand if you have to purge.

If you have gone to a directory and done bundle init then you will get an error that will look similar to the one found here.

To fix it use this command to add it as.

bundle add webrick

You should have installed Jekyll completely. It can be hard to install but once it runs, it is super easy to use. The Gatsby team for example has gone as far as to say that Static Site Generators are more environmentally friendly as they do not use a database. Anyone can get started with it and write really about anything, it doesn’t even have to be about programming. Just please, when blogging objectively, do not let it turn to hate.

What Should I Do Now?

Picture of empty toilet paper roll that says “Don’t panic”
Photo by Jasmin Sessler on Unsplash

If you don’t have an old site then perfect because it will be easier to use Jekyll as you just have to download their themes now. GitHub Pages allows you to host your static site for free.

You might consider getting a domain name though for your site.

I hope you have as much fun with Jekyll as I have. Feel free to reach out if you have difficulties getting this working. I have picked up some things. Goodbye for now.

Resources:


How To Install Jekyll on WSL 2 was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Jordan Nash


Print Share Comment Cite Upload Translate Updates
APA

Jordan Nash | Sciencx (2022-10-12T17:28:30+00:00) How To Install Jekyll on WSL 2. Retrieved from https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/

MLA
" » How To Install Jekyll on WSL 2." Jordan Nash | Sciencx - Wednesday October 12, 2022, https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/
HARVARD
Jordan Nash | Sciencx Wednesday October 12, 2022 » How To Install Jekyll on WSL 2., viewed ,<https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/>
VANCOUVER
Jordan Nash | Sciencx - » How To Install Jekyll on WSL 2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/
CHICAGO
" » How To Install Jekyll on WSL 2." Jordan Nash | Sciencx - Accessed . https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/
IEEE
" » How To Install Jekyll on WSL 2." Jordan Nash | Sciencx [Online]. Available: https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/. [Accessed: ]
rf:citation
» How To Install Jekyll on WSL 2 | Jordan Nash | Sciencx | https://www.scien.cx/2022/10/12/how-to-install-jekyll-on-wsl-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.