New documentation setup (#1708)

* initial docsite setup

* switch from pushd to cd

* install and set up solidity-docgen

* use the docsite branch next for now

* make it clear that env var is a repository

* add a clarifying comment about a relative path

* change relative to absolute path in docsite script

* add docgen script

* add first few READMEs for contract documentation

* update solidity-docgen

* add docsite as dependency and adjust script

* update openzeppelin-docsite

* update solidity-docgen

* remove dummy text

* update docgen and docsite

* update openzeppelin-docsite

* add netlify.toml

* udpate tokens guide for 2.2

* add DOCUMENTATION.md

* Update docs/learn-about-utilities.md

Co-Authored-By: frangio <frangio.1@gmail.com>

* fix PaymentSplitter docs wording

* update solidity-docgen

* add missing ERC20 contracts

* update solidity-docgen

* trigger deploy with cleared cache

* update solidity-docgen

* update openzeppelin-docsite

* remove travis docs setup

* update openzeppelin-docsite

* switch to published solidity-docgen
This commit is contained in:
Francisco Giordano
2019-04-23 12:25:22 -03:00
committed by GitHub
parent 412cdfd0be
commit ed5652b0aa
19 changed files with 8175 additions and 241 deletions

View File

@ -1,32 +0,0 @@
#!/bin/bash
#
# Trigger the job that will update the documentation website.
# Argument:
# version: the version of the new release. This should be a tag in the
# https://github.com/OpenZeppelin/openzeppelin-solidity repository.
set -ev
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
readonly VERSION="$1"
readonly BODY="{
\"request\": {
\"branch\": \"master\",
\"config\": {
\"env\": [\"VERSION=${VERSION}\"]
}
}
}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${DOCS_TRAVIS_API_TOKEN}" \
-d "${BODY}" \
https://api.travis-ci.com/repo/OpenZeppelin%2Fopenzeppelin-docs/requests

6
scripts/docgen.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
OUTDIR=docs/api
rm -rf "$OUTDIR"
solidity-docgen -o "$OUTDIR" -i contracts/mocks -i contracts/examples

8
scripts/docsite.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# usage: npm run docsite [build|start]
set -o errexit
npm run docgen
npx openzeppelin-docsite-run "$1"