Install Ruby:
sudo apt-get install -y build-essential ruby-dev git
Avoid installing RubyGems packages (called gems) as the root user. Set up a gem installation directory for your user account. The following commands will add environment variables to your ~/.bashrc
file to configure the gem installation path:
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Install Jekyll and Bundler:
gem install jekyll bundler
Clone the Beautiful Jekyll repo:
git clone https://github.com/daattali/beautiful-jekyll.git
Navigate to your blog directory and install all dependencies:
cd beautiful-jekyll
bundle install
Run your site locally:
bundle exec jekyll serve
You can now view your site at http://localhost:4000.