GithubHelp home page GithubHelp logo

isabella232 / legacy-api-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gocardless/legacy-api-docs

0.0 0.0 0.0 3.49 MB

Docs for GoCardless legacy API

Home Page: https://developer.gocardless.com/legacy/

License: MIT License

Ruby 0.68% JavaScript 80.28% Shell 0.03% HTML 4.47% C# 0.66% Java 0.63% PHP 1.43% Python 0.41% CSS 11.43%

legacy-api-docs's Introduction

GoCardless API Docs

View API Docs: https://developer.gocardless.com


Running locally

npm install
npm start

Deploying

cap staging deploy
cap production deploy

TOC Ordering

Pages are ordered by sorting a concatenated string constructed from the folder tree plus the file name.

Example:

/source/docs/01_resources/01_bill/01_overview.md > "01_resources02_bill01_overview.md"
/source/docs/01_resources/02_merchant/01_overview.md > "01_resources002_merchant01_overview.md"

TOC Construction

The navigation tree is built by parsing the headings on the rendered page.

  • h0 represents a nav section header (e.g. "API")
  • h1 represents a top level item in the nav (e.g. "Bill")
  • h2 represents a sub resource (e.g. "Create a one-off bill")

This means you need to make sure the pages and their heading levels are ordered in the right way within the docs folder.

The folder tree does not change the navigation nesting

Example:

<h0>API</h0>
<h1>Overview</h1>
<h0>Resource</h0>
<h1>Bill</h1>
<h2>Create one-off bill</h2>

Would render:

<ul>
  <li>
    <span>API</span>
    <ul>
      <li><a href>Overview</a></li>
    </ul>
  </li>
  <li>
    <span>Resources</span>
    <ul>
      <li>
        <a href>Bill</a>
        <ul>
          <li><a href>Create one-off bill</a></li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

If the heading levels are out of order the navigation nesting will break. For example, if page ordering ends up putting the h2 before the h1 for the same resource.


Code samples

The default language is HTTP

Article independent code samples must be placed in a code folder in the article folder.

Name the code examples using the appropriate extname from ./data/languages.json

Code articles

The default language is HTTP

Entire pages can be shown for specific languages by adding the language extname to the filename.

Example:

  • Only show for Ruby getting_started.rb.md
  • Show default (HTTP): getting_started.http.md

The appropriate extname can be found in ./data/languages.json

legacy-api-docs's People

Contributors

alan avatar almonk avatar amfarrell avatar angusbayley avatar appleton avatar bamesjerry avatar banderous avatar cfsimplicity avatar deanpcmad avatar feelepxyz avatar georg911 avatar greysteil avatar hmac avatar hmarr avatar jackfranklin avatar jacobpgn avatar jamesshedden avatar karls avatar ken-lo avatar kitgocardless avatar leejo avatar manoj-nathwani avatar petehamilton avatar samjewell avatar sinjo avatar vivienschilis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.