From 46252a9b69627c7afb06faf52089103a6b27c76f Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Tue, 6 Oct 2020 00:36:46 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20docs-staging=20=E2=86=92=20master=20(#5?= =?UTF-8?q?468)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description - Makefile: branches and path prefixes from `versions` work on `docs-staging` https://github.com/tendermint/tendermint/pull/5467 - Expects to have: - https://docs.tendermint.com/master - https://docs.tendermint.com/v0.32 - https://docs.tendermint.com/v0.33 --- Makefile | 12 ++++++------ docs/.vuepress/config.js | 2 +- docs/package.json | 3 +++ docs/versions | 6 +++--- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 5ecb52700..cc4c8cb97 100644 --- a/Makefile +++ b/Makefile @@ -188,12 +188,12 @@ DESTINATION = ./index.html.md ############################################################################### 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 ; \ + @cd docs && \ + while read -r branch path_prefix; do \ + (git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \ + mkdir -p ~/output/$${path_prefix} ; \ + cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \ + cp ~/output/$${path_prefix}/index.html ~/output ; \ done < versions ; .PHONY: build-docs diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 6f0ce077c..24f1afec1 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -160,5 +160,5 @@ module.exports = { ga: 'UA-51029217-11' } ] - ], + ] }; diff --git a/docs/package.json b/docs/package.json index 57ac60d0a..f8d241372 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,6 +6,9 @@ "dependencies": { "vuepress-theme-cosmos": "^1.0.173" }, + "devDependencies": { + "watchpack": "^1.6.1" + }, "scripts": { "preserve": "./pre.sh", "serve": "trap 'exit 0' SIGINT; vuepress dev --no-cache", diff --git a/docs/versions b/docs/versions index 1e6a12928..3a065dfeb 100644 --- a/docs/versions +++ b/docs/versions @@ -1,3 +1,3 @@ -v0.32 -v0.33 -master +master master +v0.32 v0.32 +cyrus/0.33-version v0.33 \ No newline at end of file