1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-07-01 06:02:10 +02:00

Merge branch 'master' into feature/principles

This commit is contained in:
Matthias Kretschmann 2018-11-16 14:36:05 +01:00 committed by GitHub
commit b2f82bfbd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 98 additions and 8 deletions

View File

@ -7,6 +7,11 @@ script:
- npm test
- 'if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then npm run build; fi'
after_success:
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
- npm run deploy
notifications:
email: false

View File

@ -30,6 +30,7 @@
- [Linting & formatting](#linting--formatting)
- [Editor setup: VS Code](#editor-setup-vs-code)
- [GitHub GraphQL API](#github-graphql-api)
- [Deployment](#deployment)
- [Authors](#authors)
- [License](#license)
@ -78,21 +79,25 @@ All Markdown files should use
1. The file must begin with a section called YAML frontmatter that looks like this:
```yaml
```md
---
title: This is the Title in Title Case
description: A short description of the page.
---
Markdown content begins here.
```
For external documents in other repos, defining the `slug` and `section` is required:
```yaml
```md
---
title: This is the Title in Title Case
description: A short description of the page.
slug: /concepts/architecture/
section: concepts
---
Markdown content begins here.
```
@ -101,8 +106,8 @@ All Markdown files should use
2. Don't include the page title or description in the Markdown section. That is, don't begin the Markdown content with `# This is the Title in Title Case`. Just write as if that were already there.
3. start your heading levels with `h2`, so `## My heading`
4. Internal links to other docs pages should be:
- to the _full absolute URL_, such as https://docs.oceanprotocol.com/hello/you-are-awesome/ or https://github.com/oceanprotocol/dev-ocean/blob/master/doc/development/style-guides.md or
- to a absolute URL without the host, that looks like `/concepts/terminology/` with slashes on the beginning and end, and with no `.md` or `.html` at the end (before the last slash).
- when linking from external repos, to the _full absolute URL_, such as `https://docs.oceanprotocol.com/hello/you-are-awesome/`
5. no TOC please, this will be generated automatically from all headings
6. for images and media, you can keep them in the original repo. Images will be automatically grabbed by the docs site on querying. When doing that, docs site will generate all sorts of image sizes to handle proper responsive images, so no need to keep an eye on image dimensions or file sizes
@ -271,6 +276,27 @@ query {
}
```
## Deployment
Automatic deployments are triggered upon successful tests & builds on Travis:
- push to `master` initiates a live deployment
-> [docs.oceanprotocol.com](https://docs.oceanprotocol.com)
- any Pull Request, and subsequent pushes to it, initiates a beta deployment
-> [beta.docs.oceanprotocol.com](https://beta.docs.oceanprotocol.com)
The deploy command simply calls the [`scripts/deploy.sh`](scripts/deploy.sh) script, syncing the contents of the `public/` folder to S3:
```bash
npm run deploy
```
Requires authorization against AWS with [one of the various ways](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html), on Travis this is done with those environment variables:
- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `AWS_DEFAULT_REGION`
## Authors
- Troy McConaghy ([@ttmc](https://github.com/ttmc)) - [Ocean Protocol](https://oceanprotocol.com)

View File

@ -11,7 +11,7 @@ Aquarius provides an API to an off-chain database ("OceanDB") to store and manag
The off-chain database might be MongoDB, Elasticsearch or BigchainDB.
<repo name="aquarius" readme="true"></repo>
<repo name="aquarius"></repo>
## Brizo

View File

@ -15,15 +15,21 @@ Through blockchain technology and tokens, Ocean Protocol connects data providers
By bringing together decentralized blockchain technology, a data sharing framework, and an ecosystem for data and related services, Ocean Protocol is committed to kick-starting a new Data Economy that touches every single person, company and device, giving power back to data owners, enabling people to reap value from data to better our world.
## Mission Statement
Society is becoming increasingly reliant on data, especially with the advent of AI. However, a small handful of organizations with both massive data assets and AI capabilities attained worrying levels of control which is a danger to a free and open society.
Ocean Protocol aims to unlock data, for more equitable outcomes for users of data, using a thoughtful application of both technology and governance.
## Papers
There are more details on the
[Ocean Protocol home page](https://oceanprotocol.com/#papers),
and in the whitepapers:
- [Technical Whitepaper](https://oceanprotocol.com/tech-whitepaper.pdf)
- [Business Whitepaper](https://oceanprotocol.com/business-whitepaper.pdf)
- [Reference Marketplace Framework](https://oceanprotocol.com/marketplace-framework.pdf)
- [Technical Whitepaper](https://oceanprotocol.com/tech-whitepaper.pdf) - This paper presents Ocean Protocol. Ocean is a decentralized protocol and network of artificial intelligence (AI) data/services. It incentivizes for a vast supply of relevant AI data/services.
- [Business Whitepaper](https://oceanprotocol.com/business-whitepaper.pdf) - This document presents a summary of the business model and ecosystem of Ocean Protocol. In addition, it describes the logic behind the Ocean utility token and the economic incentives driving the Protocol. It is complementary to the technical whitepaper for Ocean Protocol.
- [Marketplace Framework](https://oceanprotocol.com/marketplace-framework.pdf) - This document presents a summary of the core marketplace attributes and components required to facilitate the successful deployment of the decentralized data exchange protocol and network called Ocean Protocol.
## More Information

View File

@ -18,7 +18,8 @@
"lint:md": "markdownlint './**/*.{md,markdown}' --ignore './{node_modules,external,public}/**/*'",
"lint:yml": "prettier '**/*.{yml,yaml}' --list-different",
"lint": "run-p --continue-on-error lint:js lint:css lint:md lint:yml",
"test": "npm run lint"
"test": "npm run lint",
"deploy": "./scripts/deploy.sh"
},
"dependencies": {
"@oceanprotocol/art": "^1.0.2",

52
scripts/deploy.sh Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
#
# required environment variables:
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# AWS_DEFAULT_REGION
AWS_S3_BUCKET="docs.oceanprotocol.com"
AWS_S3_BUCKET_BETA="beta.docs.oceanprotocol.com"
SITEMAP_URL="https%3A%2F%2Fdocs.oceanprotocol.com%2Fsitemap.xml"
#
set -e;
function s3sync {
aws s3 sync ./public s3://"$1" --exclude "*.html" --exclude "*.xml" --cache-control max-age=31536000,public,immutable --delete --acl public-read --quiet
aws s3 sync ./public s3://"$1" --exclude "*" --include "*.html" --include "*.xml" --cache-control max-age=0,no-cache,no-store,must-revalidate --delete --acl public-read --quiet
}
##
## check for pull request against master
##
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
s3sync $AWS_S3_BUCKET_BETA
##
## check for master push which is no pull request
##
elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] || [ "$TRAVIS" != true ]; then
s3sync $AWS_S3_BUCKET
# ping search engines
# returns: HTTP_STATUSCODE URL
# curl -sL -w "%{http_code} %{url_effective}\\n" \
# "http://www.google.com/webmasters/tools/ping?sitemap=$SITEMAP_URL" -o /dev/null \
# "http://www.bing.com/webmaster/ping.aspx?siteMap=$SITEMAP_URL" -o /dev/null
echo "---------------------------------------------"
echo " ✓ done deployment "
echo "---------------------------------------------"
exit;
else
echo "---------------------------------------------"
echo " nothing to deploy "
echo "---------------------------------------------"
fi