Skip to content

Commit a74989d

Browse files
authored
feat: migrate to docusaurus (#13471)
1 parent 7167371 commit a74989d

File tree

226 files changed

+30579
-10363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+30579
-10363
lines changed

.github/workflows/build-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
check-docs-build:
16-
if: ${{ github.event.label.name == 'docs' }}
16+
if: ${{ contains(github.event.label.name, 'docs') }}
1717

1818
name: Check docs build
1919
runs-on: ubuntu-latest
@@ -26,4 +26,4 @@ jobs:
2626

2727
- name: Build docs
2828
run: |
29-
make build-docs LEDGER_ENABLED=false
29+
make build-docs

.github/workflows/deploy-docs.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
permissions:
2020
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
2121
runs-on: ubuntu-latest
22-
container:
23-
image: ghcr.io/cosmos/website-deployment
2422
steps:
2523
- name: Checkout 🛎️
2624
uses: actions/checkout@v3
@@ -29,10 +27,14 @@ jobs:
2927
fetch-depth: 0
3028
path: "."
3129

30+
- name: Use Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: "16.x"
34+
3235
- name: Build 🔧
3336
run: |
34-
git config --global --add safe.directory /__w/cosmos-sdk/cosmos-sdk
35-
make build-docs LEDGER_ENABLED=false
37+
make build-docs
3638
3739
- name: Deploy 🚀
3840
uses: JamesIves/[email protected]

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
359359
### Client Breaking Changes
360360

361361
* [#11797](https://github.com/cosmos/cosmos-sdk/pull/11797) Remove all RegisterRESTRoutes (previously deprecated)
362-
* [#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) interacting with the node through `grpc.Dial` requires clients to pass a codec refer to [doc](docs/run-node/interact-node.md).
362+
* [#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) interacting with the node through `grpc.Dial` requires clients to pass a codec refer to [doc](docs/docs/run-node/02-interact-node.md).
363363
* [#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints.
364364
* [#9995](https://github.com/cosmos/cosmos-sdk/pull/9995) Increased gas cost for creating proposals.
365365
* [#11029](https://github.com/cosmos/cosmos-sdk/pull/11029) The deprecated Vote Option field is removed in gov v1beta2 and nil in v1beta1. Use Options instead.

CODING_GUIDELINES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ and API.
4141

4242
UAT should be revisited at each stage of the product development:
4343

44-
![acceptance-tests.png](./docs/assets/acceptance-tests.png)
44+
![acceptance-tests.png](./docs/static/img/acceptance-tests.png)
4545

4646
### Why Acceptance Testing
4747

Makefile

+15-14
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,23 @@ godocs:
188188
@echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/cosmos/cosmos-sdk/types"
189189
godoc -http=:6060
190190

191-
# This builds a docs site for each branch/tag in `./docs/versions`
192-
# and copies each site to a version prefixed path. The last entry inside
193-
# the `versions` file will be the default root index.html (and it should be main).
194-
# Only redirects that are built into the "redirects" folder of each of
195-
# the branches will be copied out to the root of the build at the end.
191+
# This builds the docs.cosmos.network docs using docusaurus.
192+
# Old documentation, which have not been migrated to docusaurus are generated with vuepress.
196193
build-docs:
194+
@echo "building docusaurus docs"
195+
@cd docs && npm ci && npm run build
196+
mv docs/build ~/output
197+
198+
@echo "building old docs"
197199
@cd docs && \
198-
while read -r branch path_prefix; do \
199-
echo "building branch $${branch}" ; \
200-
(git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
201-
mkdir -p ~/output/$${path_prefix} ; \
202-
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
203-
cp ~/output/$${path_prefix}/index.html ~/output ; \
204-
cp ~/output/$${path_prefix}/404.html ~/output ; \
205-
cp -r ~/output/$${path_prefix}/redirects/* ~/output || true ; \
206-
done < versions ;
200+
while read -r branch path_prefix; do \
201+
echo "building vuepress $${branch} docs" ; \
202+
(git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
203+
mkdir -p ~/output/$${path_prefix} ; \
204+
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
205+
done < vuepress_versions ;
206+
207+
@echo "setup domain"
207208
@echo $(DOCS_DOMAIN) > ~/output/CNAME
208209

209210
.PHONY: build-docs

README.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
<!--
2-
parent:
3-
order: false
4-
-->
5-
61
<div align="center">
72
<h1> Cosmos SDK </h1>
83
</div>
94

10-
![banner](docs/assets/banner.jpg)
5+
![banner](docs/static/img/banner.jpg)
116

127
<div align="center">
138
<a href="https://github.com/cosmos/cosmos-sdk/blob/main/LICENSE">

core/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ package and composing apps using the [appconfig](https://pkg.go.dev/cosmossdk.io
88
package is provided.
99

1010
In the future core functionality for building Cosmos SDK app modules will be
11-
provided in this go module.
11+
provided in this go module.

cosmovisor/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
15
# Cosmovisor
26

37
`cosmovisor` is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, `cosmovisor` can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.

depinject/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
15
# Cosmos SDK Dependency Injection `depinject` Module
26

37
## Overview

docs/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

0 commit comments

Comments
 (0)