Skip to content

Using Slate in Vagrant

markbackhouse edited this page Dec 2, 2020 · 3 revisions

Provided in the slate repo is a Vagrantfile you can use to run slate using vagrant. Vagrant is used to create a virtual machine (VM) that runs under VirtualBox or other related software and provides you a reproducible and portable development environment, without having to figure things out on your host. This is especially useful for Windows where getting things right, like nokogiri which potentially requires native compilation, can be tricky.

Dependencies

Getting started

  1. Fork this repository on Github.
  2. Clone your forked repository (not our original one) to your hard drive with git clone https://github.com/YOURUSERNAME/slate.git
  3. cd slate

Running Vagrant

Creating the Vagrant VM is as easy as doing:

vagrant up

And you can view your docs at http://localhost:4567.

If you wish to build the docs to HTML, run

vagrant ssh -c "cd /vagrant; bundle exec middleman build"

Stopping Vagrant

Once you're done with your work and you wish to shutdown the VM that vagrant creates, you will need to run:

vagrant halt

What Now?

The next step is to learn how to edit source/index.md to change the content of your docs. Once you're done, you might want to think about deploying your docs.