This is the source for the API documentation of When I Work. If you're looking for the actual documentation page, it can be found at http://dev.wheniwork.com.
You're going to need:
- Ruby, version 1.9.3 or newer
- Bundler — If Ruby is already installed, but the
bundle
command doesn't work, just rungem install bundler
in a terminal.
- Fork this repository on Github.
- Clone your forked repository to your hard drive with
git clone https://github.com/YOURUSERNAME/wheniwork-api.git
cd wheniwork-api
- Install all dependencies:
bundle install
- Start the test server:
bundle exec middleman server
You can now see the docs at http://localhost:4567. And as you edit source/index.md
, your server should automatically update! Whoa! That was fast!
Now that the API docs are all set up your machine, you'll probably want to learn more about editing Slate markdown. We do a few things differently from Slate, though, so look through this section before start editing.
Rather than using raw HTML tags, we use the aside
method. This lets us use Markdown in asides! You can set the type of aside by setting the optional parameter :class
to either 'notice'
or 'warning'
.
<% aside do %>
This is a typical notice.
<% end %>
<% aside :class => 'warning' do %>
This is a warning!
<% end %>
To deploy the API docs, run 'rake publish' from the root directory of the repository. You'll need to have proper permissions in order to perform this task.