Ocean Protocol gatsby documentation
docs
Ocean Protocol documentation.
Development
The site is a React app built with Gatsby, pulling its content from local and external Markdown files, and from various APIs.
To start, clone this repo and set your GITHUB_TOKEN
(see GitHub GraphQL API):
git clone git@github.com:oceanprotocol/docs.git
cd docs/
# add GITHUB_TOKEN
cp .env.sample .env
vi .env
Then install dependencies and start up the development server:
npm i
npm start
Alternatively, you can use Docker Compose to do the same, but without using your local system:
docker-compose up
Either one of these commands will expose a hot-reloading server under:
Linting & Formatting
To enforce a consistent code style, linting is setup for pretty much every file. Linting is part of the test suite, meaning builds on Travis will fail in case of linting errors.
In this repo the following tools are setup for that:
- ESLint with eslint-config-oceanprotocol
- markdownlint
- Prettier
# only run linting checks
npm run lint
# auto-formatting of all js, css, md, yml files
npm run format
Editor Setup: VS Code
If you use VS Code as your editor, you can install those extensions to get linting as you type, and auto-formatting as you save:
⬆️ Deployment
Every branch or Pull Request is automatically deployed by Netlify with their GitHub integration. A link to a preview deployment will appear under each Pull Request.
The latest deployment of the main
branch is automatically aliased to docs.oceanprotocol.com
.