URL: https://bittrex.github.io
- Install Jekyll
- For windows users, follow the instructions here
- Ensure you have Node.js installed. Aim for these versions:
node >= 8
npm >= 5
- Install dependencies by running the following:
bundle install
npm install
- You should be ready to go!
The docs are built using Jekyll, which serves the generated HTML. We use spectacle to generate the more sophisticated HTML, CSS and JS for the API reference pages.
To get started, first try building the API reference pages and then serve them, like so:
npm run build
- builds necessary assetsnpm run serve
- starts server- Navigate your browser to
http://localhost:4000/
In active development, we use npm-watch to watch for changes. Either:
- Run
npm run dev
to serve and watch in one process or:
- In one process:
npm run watch
- watch the build directories - In a separate process:
npm run serve
Note: Errors like Liquid Exception: Could not locate the included file 'assets/index.html'
in the jekyll process as the spectacle docs get rebuilt are normal.
Note: You can also just watch specific builds by specifying which build step to watch like: npm run watch [watch script]
In order to update the docs site with a new version of the API spec, all you have to do is build spectacle with the new spec file.
A couple things to note:
- We do not generate an API spec file for v1, so the spec file was built manually
- The API spec file for v3 is automatically generated, and we have a few changes that we make manually, so a build step is required to get the final spec JSON used to generate the static site
- Make changes directly to the JSON file at
_data/api-spec-v1-1.json
- Rebuild the v1 docs page
npm run build:spectacle:v1
- Place the generated API spec JSON file at
src/_data/api-spec-v3.json
(overwrite the current file) - Build the v3 spec file
npm run build:json:v3
- Rebuild the v3 docs site
npm run build:spectacle:v3