Skip to content

Commit

Permalink
feat: migrate to docusaurus (#13471)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Oct 10, 2022
1 parent 7167371 commit a74989d
Show file tree
Hide file tree
Showing 226 changed files with 30,579 additions and 10,363 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

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

name: Check docs build
runs-on: ubuntu-latest
Expand All @@ -26,4 +26,4 @@ jobs:

- name: Build docs
run: |
make build-docs LEDGER_ENABLED=false
make build-docs
10 changes: 6 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
runs-on: ubuntu-latest
container:
image: ghcr.io/cosmos/website-deployment
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
Expand All @@ -29,10 +27,14 @@ jobs:
fetch-depth: 0
path: "."

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"

- name: Build 🔧
run: |
git config --global --add safe.directory /__w/cosmos-sdk/cosmos-sdk
make build-docs LEDGER_ENABLED=false
make build-docs
- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Client Breaking Changes

* [#11797](https://github.com/cosmos/cosmos-sdk/pull/11797) Remove all RegisterRESTRoutes (previously deprecated)
* [#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).
* [#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).
* [#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.
* [#9995](https://github.com/cosmos/cosmos-sdk/pull/9995) Increased gas cost for creating proposals.
* [#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.
Expand Down
2 changes: 1 addition & 1 deletion CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ and API.

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

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

### Why Acceptance Testing

Expand Down
29 changes: 15 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,23 @@ godocs:
@echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/cosmos/cosmos-sdk/types"
godoc -http=:6060

# This builds a docs site for each branch/tag in `./docs/versions`
# and copies each site to a version prefixed path. The last entry inside
# the `versions` file will be the default root index.html (and it should be main).
# Only redirects that are built into the "redirects" folder of each of
# the branches will be copied out to the root of the build at the end.
# This builds the docs.cosmos.network docs using docusaurus.
# Old documentation, which have not been migrated to docusaurus are generated with vuepress.
build-docs:
@echo "building docusaurus docs"
@cd docs && npm ci && npm run build
mv docs/build ~/output

@echo "building old docs"
@cd docs && \
while read -r branch path_prefix; do \
echo "building branch $${branch}" ; \
(git clean -fdx && git reset --hard && 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 ; \
cp ~/output/$${path_prefix}/404.html ~/output ; \
cp -r ~/output/$${path_prefix}/redirects/* ~/output || true ; \
done < versions ;
while read -r branch path_prefix; do \
echo "building vuepress $${branch} docs" ; \
(git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
done < vuepress_versions ;

@echo "setup domain"
@echo $(DOCS_DOMAIN) > ~/output/CNAME

.PHONY: build-docs
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<!--
parent:
order: false
-->

<div align="center">
<h1> Cosmos SDK </h1>
</div>

![banner](docs/assets/banner.jpg)
![banner](docs/static/img/banner.jpg)

<div align="center">
<a href="https://github.com/cosmos/cosmos-sdk/blob/main/LICENSE">
Expand Down
2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ package and composing apps using the [appconfig](https://pkg.go.dev/cosmossdk.io
package is provided.

In the future core functionality for building Cosmos SDK app modules will be
provided in this go module.
provided in this go module.
4 changes: 4 additions & 0 deletions cosmovisor/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_position: 1
---

# Cosmovisor

`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.
Expand Down
4 changes: 4 additions & 0 deletions depinject/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_position: 1
---

# Cosmos SDK Dependency Injection `depinject` Module

## Overview
Expand Down
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Loading

0 comments on commit a74989d

Please sign in to comment.