Wednesday, August 7, 2019

Installing Jekyll on Windows 10 with Windows Subsystem for Linux

Following the Jekyll document, I installed Jekyll on Windows 10 with Windows System for Linux. The steps were as follows:

  1. Enable Windows Subsystem for Linux following Microsoft's documentation, i.e., 
    1. In Windows 10, open PowerShell as Administrator.
    2. Run the following in PowerShell

      Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
      

    3. Restart Windows
  2. Download and install a Linux distribution from Microsoft Store by opening the following URL in a Web browser: https://aka.ms/wslstore
  3.  Open a Windows Command Prompt window, and run

    bash
    

  4. Run the following in bash
    
    sudo apt-get update -y && sudo apt-get upgrade -y
    sudo apt-get install -y --no-install-recommends software-properties-common gnupg gpg-agent dirmngr 
    sudo apt-add-repository ppa:brightbox/ruby-ng
    sudo apt-get update
    sudo apt-get install -y ruby2.5 ruby2.5-dev build-essential dh-autoreconf zlib1g-dev
    sudo apt-get install bundler
    sudo gem update
    

  5. Assume you have a Jeykll site at the www directory. Then go to the directory in bash
    
    cd www
    

  6. In bash, run the following
    
    cd www
    bundle update
    bundle install
    
  7. Build the site and launch the Web serer for testing.
    
    bundle exec jekyll serve --host=0.0.0.0 --incremental
    

No comments:

Post a Comment