Vagrant file for a Jekyll environment
Simple Vagrant file to build a Jekyll environment and a clean modern Ruby install on Ubuntu.
Big hat-tip to https://github.com/rjsilk/vagrant-github-pages for the repo which this is based on.
How to use
Next, clone this repo:
git clone email@example.com:qubika/vagrant-jekyll.git
Open the Vagrantfile in a text editor and update the sync folder. Alternatively if not required, just comment out / remove the line.
config.vm.synced_folder "<your local path here e.g. ../my-jekyll-project", "/jekyll-src"
cd into that directory and start up the Vagrant vm:
cd vagrant-jekyll vagrant up
Finally, you can ssh into the vm and do all your Jekyll-related work in there:
The Vagrant vm is configured to forward port 8124 by default. So you can start a Jekyll server like so:
cd /jekyll-src jekyll server --host=0.0.0.0 --force-polling -P 8124
And then navigate to localhost:8124 on your host box.
Note on SSH-forwarding
The Vagrantfile enables ssh-forwarding so that you can use your host ssh keys to authenticate with github. Make sure to add you keys to the agent with
ssh-add before running
vagrant ssh if your keys aren't automatically added to the agent.