Skip to content

Commit

Permalink
Merge PR CosmWasm#250: Docs-update
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored and alexanderbez committed Jan 15, 2020
1 parent ce37252 commit f61b391
Show file tree
Hide file tree
Showing 47 changed files with 11,018 additions and 210 deletions.
34 changes: 14 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ executors:
GO_VERSION: "1.13"
docs:
docker:
- image: tendermintdev/jq_curl
- image: tendermintdev/docker-website-deployment
environment:
AWS_REGION: us-east-1
LEDGER_ENABLED: false


commands:
Expand Down Expand Up @@ -226,24 +227,11 @@ jobs:
steps:
- checkout
- run:
name: Trigger website build
command: |
curl --silent \
--show-error \
-X POST \
--header "Content-Type: application/json" \
-d "{\"branch\": \"$CIRCLE_BRANCH\"}" \
"https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$WEBSITE_REPO_NAME/build?circle-token=$TENDERBOT_API_TOKEN" > response.json
RESULT=`jq -r '.status' response.json`
MESSAGE=`jq -r '.message' response.json`
if [[ ${RESULT} == "null" ]] || [[ ${RESULT} -ne "200" ]]; then
echo "CircleCI API call failed: $MESSAGE"
exit 1
else
echo "Website build started"
fi
name: "Build docs"
command: make build-docs
- run:
name: "Upload docs to S3"
command: make sync-docs

macos-ci:
executor: mac
Expand Down Expand Up @@ -382,11 +370,17 @@ workflows:
- master
- develop
- deploy-docs:
context: gaia-docs-deployment-staging
filters:
branches:
only:
- docs-update
- deploy-docs:
context: gaia-docs-deployment
filters:
branches:
only:
- master
- develop
- setup-dependencies:
# filters here are needed to enable this job also for tags
filters:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check links
on: [pull_request]
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
uses: peter-evans/link-checker@v1
with:
args: -v -r *
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ docs/_build
docs/tutorial
dist
tools-stamp
docs/node_modules

# Data - ideally these don't exist
baseapp/data/*
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/gaiad
go install -mod=readonly $(BUILD_FLAGS) ./cmd/gaiacli


########################################
### Documentation

build-docs:
@cd docs && \
while read p; do \
(git checkout $${p} && npm install && VUEPRESS_BASE="/$${p}/" npm run build) ; \
mkdir -p ~/output/$${p} ; \
cp -r .vuepress/dist/* ~/output/$${p}/ ; \
cp ~/output/$${p}/index.html ~/output ; \
done < versions ;

sync-docs:
cd ~/output && \
echo "role_arn = ${DEPLOYMENT_ROLE_ARN}" >> /root/.aws/config ; \
echo "CI job = ${CIRCLE_BUILD_URL}" >> version.html ; \
aws s3 sync . s3://${WEBSITE_BUCKET} --profile terraform --delete ; \
aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --profile terraform --path "/*" ;
.PHONY: sync-docs

########################################
### Tools & dependencies

Expand Down
11 changes: 11 additions & 0 deletions docs/.vuepress/components/home.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<div></div>
</template>

<script>
export default {
mounted() {
window.location.assign(`${this.$site.base}hub-overview/overview.html`)
}
}
</script>
160 changes: 160 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
module.exports = {
theme: "cosmos",
title: "Cosmos Hub",
head: [
[
"link",
{
rel: "stylesheet",
type: "text/css",
href: "https://cloud.typography.com/6138116/7255612/css/fonts.css"
}
],
],
base: process.env.VUEPRESS_BASE || "/",
themeConfig: {
docsRepo: "cosmos/gaia",
docsDir: "docs",
editLinks: true,
label: "hub",
sidebar: [
{
title: "Resources",
children: [
{
title: "Tutorials",
path: "https://tutorials.cosmos.network"
},
{
title: "SDK API Reference",
path: "https://godoc.org/github.com/cosmos/cosmos-sdk"
},
{
title: "REST API Spec",
path: "https://cosmos.network/rpc/"
}
]
}
],
gutter: {
title: "Help & Support",
editLink: true,
chat: {
title: "Riot Chat",
text: "Chat with Cosmos developers on Riot Chat.",
url: "https://riot.im/app/#/room/#cosmos-sdk:matrix.org",
bg: "linear-gradient(225.11deg, #2E3148 0%, #161931 95.68%)"
},
forum: {
title: "Cosmos SDK Forum",
text: "Join the SDK Developer Forum to learn more.",
url: "https://forum.cosmos.network/",
bg: "linear-gradient(225deg, #46509F -1.08%, #2F3564 95.88%)",
logo: "cosmos"
},
github: {
title: "Found an Issue?",
text: "Help us improve this page by suggesting edits on GitHub."
}
},
footer: {
logo: "/logo-bw.svg",
textLink: {
text: "cosmos.network",
url: "/"
},
services: [
{
service: "medium",
url: "https://blog.cosmos.network/"
},
{
service: "twitter",
url: "https://twitter.com/cosmos"
},
{
service: "linkedin",
url: "https://www.linkedin.com/company/tendermint/"
},
{
service: "reddit",
url: "https://reddit.com/r/cosmosnetwork"
},
{
service: "telegram",
url: "https://t.me/cosmosproject"
},
{
service: "youtube",
url: "https://www.youtube.com/c/CosmosProject"
}
],
smallprint:
"This website is maintained by Tendermint Inc. The contents and opinions of this website are those of Tendermint Inc.",
links: [
{
title: "Documentation",
children: [
{
title: "Cosmos SDK",
url: "https://docs.cosmos.network"
},
{
title: "Cosmos Hub",
url: "https://hub.cosmos.network/"
},
{
title: "Tendermint Core",
url: "https://docs.tendermint.com/"
}
]
},
{
title: "Community",
children: [
{
title: "Cosmos blog",
url: "https://blog.cosmos.network/"
},
{
title: "Forum",
url: "https://forum.cosmos.network/"
},
{
title: "Chat",
url: "https://riot.im/app/#/room/#cosmos-sdk:matrix.org"
}
]
},
{
title: "Contributing",
children: [
{
title: "Contributing to the docs",
url:
"https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md"
},
{
title: "Source code on GitHub",
url: "https://github.com/cosmos/cosmos-sdk/"
}
]
}
]
}
},
plugins: [
// [
// "@vuepress/google-analytics",
// {
// ga: "UA-51029217-12"
// }
// ],
[
"sitemap",
{
hostname: "https://hub.cosmos.network"
}
]
]
};
8 changes: 8 additions & 0 deletions docs/.vuepress/public/logo-bw.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f61b391

Please sign in to comment.