diff --git a/.gitignore b/.gitignore index f6fc8c00b25..f1953e3a979 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,10 @@ tmp *.DS_STORE build/ .cache +.vagrant # YARD artifacts .yardoc _yardoc doc/ -.idea/ \ No newline at end of file +.idea/ diff --git a/README.md b/README.md index 2f042e7f2c2..b2e4105aeb9 100644 --- a/README.md +++ b/README.md @@ -43,23 +43,27 @@ You're going to need: ### Getting Set Up - 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` - 4. Install all dependencies: `bundle install` - 5. Start the test server: `bundle exec middleman server` - -Or use the included Dockerfile! (must install Docker first) - +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` +4. Initialize and start + * Manually: +```shell +bundle install +bundle exec middleman server +``` + * Or via Docker (must install Docker first) ```shell docker build -t slate . docker run -d -p 4567:4567 --name slate -v $(pwd)/source:/app/source slate +``` + You can now see the docs at http://localhost:4567. Whoa! That was fast! Note: if you're using the Docker setup on OSX, the docs will be + availalable at the output of `boot2docker ip` instead of `localhost:4567`. + * Or via Vagrant +```shell +vagrant up ``` - -You can now see the docs at . Whoa! That was fast! - -*Note: if you're using the Docker setup on OSX, the docs will be -availalable at the output of `boot2docker ip` instead of `localhost:4567`.* + You can now see the docs at http://localhost:4567. Now that Slate is all set up your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/tripit/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/tripit/slate/wiki/Deploying-Slate). @@ -97,6 +101,7 @@ Examples of Slate in the Wild * [SocialRadar's LocationKit Docs](https://docs.locationkit.io/) * [SafetyCulture API Documentation](https://developer.safetyculture.io/) * [hosting.de API Documentation](https://www.hosting.de/docs/api/) +* [CheddarGetter API Documentation](http://docs.cheddargetter.com) (Feel free to add your site to this list in a pull request!) diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000000..f00c7d1b60d --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,37 @@ +Vagrant.configure(2) do |config| + config.vm.box = "ubuntu/trusty64" + config.vm.network :forwarded_port, guest: 4567, host: 4567 + config.vm.provider "virtualbox" do |vb| + vb.memory = "384" + end + + config.vm.provision "bootstrap", + type: "shell", + inline: <<-SHELL + sudo apt-get update + sudo apt-get install -yq ruby ruby-dev build-essential nodejs + sudo apt-get autoremove -yq + gem install --no-ri --no-rdoc bundler + SHELL + + config.vm.provision "install", + type: "shell", + privileged: false, + inline: <<-SHELL + echo "==============================================" + echo "Installing app dependencies" + cd /vagrant + bundle install + SHELL + + config.vm.provision "run", + type: "shell", + privileged: false, + inline: <<-SHELL + echo "==============================================" + echo "Starting up middleman at http://localhost:4567" + echo "If it does not come up, check the ~/middleman.log file for any error messages" + cd /vagrant + bundle exec middleman server --force-polling -l 1 &> ~/middleman.log & + SHELL +end