Jekyll is a powerful static site generator that allows you to manage websites using plain text files. By using Windows Subsystem for Linux (WSL), you can run a full Jekyll development environment directly on your Windows machine. This guide covers the installation and setup process.
Open your WSL terminal (e.g., Ubuntu) and run the following commands:
sudo apt update
sudo apt install -y ruby-full build-essential zlib1g-dev
To avoid using sudo for installing gems and to ensure they persist correctly, add these lines to your ~/.bashrc:
echo '# Ruby Gems Environment' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
gem install jekyll bundler
If you are starting a new project:
jekyll new my-awesome-site
cd my-awesome-site
bundle install
bundle exec jekyll serve
If you’re maintaining an existing Jekyll site (like a GitHub Pages blog):
cd your-repo-name
bundle install
bundle exec jekyll serve
Your site will be available at http://localhost:4000.
GEM_HOME and PATH are correctly exported in your ~/.bashrc.bundle exec jekyll serve to ensure you are using the versions specified in your Gemfile.Powered by Jekyll and Minimal Light theme.