Install Hexo and Jekyll on Bash On Windows 10

---
date: Aug 03, 2016
tags:
- WSL
- Hexo
- Jekyll
language: English
---

Recently, I try to migrate my Hexo and Jekyll system to Bash On Windows, and find it hard to be done as I have expected.

I therefore made two SH script for Bash for easy Installation:

jekyll.sh hexo.sh

Update:

I made a even easier way to install:

To Install Hexo, run:
bash <(wget -qO- https://raw.githubusercontent.com/patrick330602/hexo-wsl-installer/master/hexo.sh)

To Install Jekyll, run:
bash <(wget -qO- https://raw.githubusercontent.com/patrick330602/jekyll-wsl-installer/master/jekyll.sh)

Script Running

But if you want to install by yourself, you can try the following steps.

Steps to install the latest version of the Jekyll static site/blog generator on Ubuntu on Windows

Steps

Step 0: Add the brightbox repository
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
Step 1: Install ruby 2.3 and -dev package
sudo apt-get install ruby2.3 ruby2.3-dev
Verify the install by running ruby -v
You should get something similar to
ruby 2.3.1p112 (2016-04-26 revision 54768)
Step 2: update ruby gems
sudo gem update --system
Step 3: install build-essential
sudo apt-get install build-essential --no-install-recommends
Step 4: install jekyll itself
sudo gem install jekyll
Verify the install by running jekyll -v
You should get something similar to
jekyll 3.1.6

Bonus steps

That’s all - happy blogging!

Anti-steps

Credits

https://www.brightbox.com/blog/2016/01/06/ruby-2-3-ubuntu-packages/
https://talk.jekyllrb.com/t/error-failed-to-build-gem-native-extension/997
https://github.com/Microsoft/BashOnWindows/issues/433

Retrieve from:http://biserkov.com/blog/2016/06/04/Steps-to-install-Jekyll-on-Ubuntu-on-Windows/

Steps to install the latest version of Hexo on Ubuntu on Windows

Steps

Step 1: Install node.js and npm from apt-get
sudo apt-get install nodejs npm
Step 2:Create a symbolic link for node
sudo ln -s /usr/bin/nodejs /usr/bin/node
Step 3:Update Node Package Manager
sudo npm install npm -g
Note: You might need to run the code twice
Step 4:Install Module n
sudo npm install n -g
Step 5:Update Node.js using module n
sudo n stable
Step 6:Finally, you can install Hexo without problem
sudo npm install -g hexo-cli

Anti-steps

Don’t run hexo server or run hexo with -watch - inotify is not (yet) working properly.

Credits

http://stackoverflow.com/questions/10075990/upgrading-node-js-to-latest-version
https://docs.npmjs.com/getting-started/installing-node

Navigation


Creative Commons License

Unless specified, all the articles are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


It uses a self-hosted Open Web Analytics to get insights. Click here to optout.

The site is powered by Hexo. The source code of this website is here, so that you can see the spaghetti code behind my blog.


Main | Blog | Comic | Podcasts (Preparing) | RSS | Sitemap
2008 - 2022 | Patrick WU Jinming