Skip to content
forked from ringcentral/slate

Beautiful static documentation for your API

License

Notifications You must be signed in to change notification settings

surge-ai/surge-documentation

 
 

Repository files navigation

Surge Documentation

Getting Set Up

  1. Install Ruby 2.5.7 rvm install ruby-2.5.7
  2. Install gems gem install bundler
  3. View the docs on a local server with bundle exec middleman server You should now be able to see the docs at http://localhost:4567.
  4. Compile the docs to static HTML/CSS/JS in the build folder with bundle exec middleman build --clean

Detailed instructions are here on the Slate Wiki

Updating docs

  1. Run bundle exec middleman build --clean to compile docs into the build directory.
  2. Copy the newly generated fonts, image, javascripts, and css folders from build to gondor/public/docs/
  3. Copy the contents of build/index.htmll to gondor/app/views/website/human_api_docs.html.erb
  4. Replace all instances of "{{YOUR_API_KEY}}" with <%= @api_key %>. so people can see their own API key on the docs if they are logged in.
  5. Edit the TOC foot section to check if the current user is logged in. The updated version looks like this:
  <% unless current_user %>
    <ul class="toc-footer">
      <li><a href='https://www.app.surgehq.ai/poster_sign_up'>Sign up for an account</a></li>
    </ul>
  <% end %>

About

Beautiful static documentation for your API

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • SCSS 42.1%
  • Shell 17.9%
  • JavaScript 17.2%
  • Ruby 16.2%
  • HTML 5.9%
  • Dockerfile 0.7%