Install Jekyll Ubuntu
by John Vincent
Posted on March 1, 2017
This is part of a series of discussions regarding Deploying to a Digital Ocean Droplet. For more details, please see Overview of johnvincent.io website
Install Jekyll Ubuntu
sudo apt-get update
Then we’ll install Ruby and its development libraries as well as make and gcc
so that Jekyll's libraries will compile once we install Jekyll:
sudo apt-get install ruby ruby-dev make gcc
When that's complete, we'll use Ruby's gem package manager to install Jekyll itself as well as the bundler to manage Gem dependencies:
sudo gem install jekyll bundler
sudo gem uninstall jekyll
sudo bundle install
Install additional gems
cd demosite
sudo bundle
Production
Added script build-prod
#!/bin/sh
#
# script to run jekyll build in a production environment
#
# JEKYLL_ENV=production jekyll build
#
JEKYLL_ENV=production jekyll build --config=_config.yml,_config_prod.yml
Development
Added script build-dev
#!/bin/sh
#
# script to run jekyll build in a development environment
#
# for debugging, use --trace
#
bundle exec jekyll serve --config=_config.yml,_config_dev.yml --watch --drafts
From browser
http://localhost:4000/