🐬 Ocean Protocol documentation. https://docs.oceanprotocol.com
These docs are meant to be viewed on docs.oceanprotocol.com. You can still browse them here but links or images might not work in some places.
If you want to contribute to these docs, then keep reading.
To write or update content, refer to the documentation of the documentation:
- Documentation: Content →
- Documentation: API References →
- Documentation: GitHub Data Fetching →
- Documentation: Repository Component →
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 --recurse-submodules git@github.com:oceanprotocol/docs.git
cd docs/
# add GITHUB_TOKEN
cp .env.sample .env
vi .envThen install dependencies and start up the development server:
npm i
npm startAlternatively, you can use Docker Compose to do the same, but without using your local system:
docker-compose upEither one of these commands will expose a hot-reloading server under:
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 formatIf you use VS Code as your editor, you can install those extensions to get linting as you type, and auto-formatting as you save:
Automatic deployments are triggered upon successful tests & builds on Travis:
- push to
maininitiates a live deployment → docs.oceanprotocol.com - any Pull Request, and subsequent pushes to it, initiates a beta deployment → betadocs.oceanprotocol.com
The deploy command simply calls the scripts/deploy.sh script, syncing the contents of the public/ folder to S3:
npm run deployRequires authorization against AWS with one of the various ways, on Travis this is done with those environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION
Copyright ((C)) 2021 Ocean Protocol Foundation Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
