From 47cdd7fb1afe6d5e3a443fc469528dc937783e9e Mon Sep 17 00:00:00 2001 From: Denali Marsh Date: Mon, 1 Jun 2020 18:49:13 -0700 Subject: [PATCH] [R4R] Basic docs (#537) * add tools, client docs to pre/post bas scripts * specify manual sidebar * tools, building, resources * remove legacy comment --- docs/.vuepress/config.js | 49 +++++++++++++++++++++++++++++++++++++++- docs/post.sh | 13 +++++++---- docs/pre.sh | 28 ++++++++++++++++++++--- 3 files changed, 81 insertions(+), 9 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2adcb726..80916ec1 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -6,5 +6,52 @@ module.exports = { src: "/kava-logo.svg", }, custom: true, - }, + autoSidebar: true, + sidebar: [ + { + title: "Kava Tools", + children: [ + { + title: "Chainlink Price Oracle", + path: "https://docs.kava.io/Tools/oracle.html" + }, + { + title: "Auction Bot", + path: "https://docs.kava.io/Tools/auction.html", + static: true + } + ] + }, + { + title: "Resources", + children: [ + { + title: "REST API Spec", + path: "https://rpc.kava.io/" + }, + { + title: "Protocol Reference", + path: "https://godoc.org/github.com/Kava-Labs/kava" + } + ] + }, + { + title: "Community", + children: [ + { + title: "Discord", + path: "https://discord.com/channels/704389840614981673/704389841051320362" + }, + { + title: "Telegram", + path: "https://t.me/kavalabs" + }, + { + title: "GitHub", + path: "https://github.com/Kava-Labs/kava" + } + ] + } + ] + } }; diff --git a/docs/post.sh b/docs/post.sh index 3c205c52..cdc90f62 100755 --- a/docs/post.sh +++ b/docs/post.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -for D in ../x/*; do - if [ -d "${D}" ]; then - rm -rf "./$(echo $D | awk -F/ '{print $NF}')" - fi -done \ No newline at end of file +# Modules +rm -rf Modules + +# JavaScript SDK docs + rm -rf Building + + # Kava Tools docs + rm -rf Tools diff --git a/docs/pre.sh b/docs/pre.sh index f83c599a..36ef66b7 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -1,8 +1,30 @@ #!/usr/bin/env bash +mkdir -p Modules + for D in ../x/*; do if [ -d "${D}" ]; then - rm -rf "./$(echo $D | awk -F/ '{print $NF}')" - mkdir -p "./$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_" && mv "./$_/README.md" "./$_/00_README.md" + rm -rf "Modules/$(echo $D | awk -F/ '{print $NF}')" + mkdir -p "Modules/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_" && mv "./$_/README.md" "./$_/00_README.md" fi -done \ No newline at end of file +done + +baseGitUrl="https://raw.githubusercontent.com/Kava-Labs" + +# Client docs (JavaScript SDK) +clientGitRepo="javascript-sdk" +clientDir="Building" + +mkdir -p "./${clientDir}" +curl "${baseGitUrl}/${clientGitRepo}/master/README.md" -o "./${clientDir}/${clientGitRepo}.md" + +# Kava Tools docs +toolsGitRepo="kava-tools" +toolsDir="Tools" +toolDocs=("auction" "oracle") + +mkdir -p "./${toolsDir}" +for T in ${toolDocs[@]}; do + curl "${baseGitUrl}/${toolsGitRepo}/master/${T}/README.md" -o "./${toolsDir}/${T}.md" +done +