Skip to content

Beautiful static documentation for your DevNet API

License

Notifications You must be signed in to change notification settings

mseashor/DevNetSlate

 
 

Repository files navigation

DevNet Slate

DevNet Slate helps you create beautiful single-page API documentation. Think of it as an intelligent, responsive documentation template for your API. This variation is based upon the Slate work done by Tripit which in turn was inspired by the API documentation by Stripe.

Sample Screenshot of Format

View the live, interactive document now!

Features

  • Clean, intuitive design — with DevNet Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by Stripe's API docs. In addition to the design you see on screen, DevNet Slate comes with a print stylesheet, so your API docs look great on paper.

  • Everything on a single page — gone are the days where your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy.

  • Slate is just Markdown — when you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks!

  • Write code samples in multiple languages — if your API has bindings in multiple programming languages, you easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with Github Flavored Markdown!

  • Out-of-the-box syntax highlighting for almost 60 languages, no configuration required.

  • Automatic, smoothly scrolling table of contents on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents.

Getting starting with Slate is super easy! Simply fork this repository, and then follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the How to Document a DevNet API

Getting Started with Slate

Prerequisites

You're going to need:

  • Linux or OS X — Windows may work, but is unsupported.
  • Ruby, version 1.9.3 or newer
  • Bundler — If Ruby is already installed, but the bundle command doesn't work, just run gem install bundler in a terminal.

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/DevNetSlate.git
  3. cd DevNetSlate
  4. Install all dependencies: bundle install
  5. Start the test server: bundle exec middleman server

Or use the included Dockerfile! (must install Docker first)

docker build -t slate .
docker run -d -p 4567:4567 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.

Learn How to Create a DevNet Slate API Document

Contributors

Slate was built by Robert Lord while at TripIt.

Thanks to the following people who have submitted major pull requests:

Also, thanks to Sauce Labs for helping sponsor the project.

Special Thanks

About

Beautiful static documentation for your DevNet API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 50.7%
  • HTML 35.6%
  • CSS 11.7%
  • Ruby 2.0%