Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve docs (backport #12647) #12650

Merged
merged 2 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ on:
push:
branches:
- main
- "release/**"
paths:
- "docs/**"
- "x/**/*.md"

jobs:
build-and-deploy:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
runs-on: ubuntu-latest
container:
image: tendermintdev/docker-website-deployment
Expand Down
23 changes: 7 additions & 16 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ module.exports = {
"/": {
lang: "en-US"
},
ko: {
lang: "ko"
},
ru: {
lang: "ru"
},
zh: {
lang: "zh-CN"
}
},
base: process.env.VUEPRESS_BASE || "/",
head: [
Expand All @@ -29,6 +20,7 @@ module.exports = {
themeConfig: {
repo: "cosmos/cosmos-sdk",
docsRepo: "cosmos/cosmos-sdk",
docsBranch: "release/v0.46.x",
docsDir: "docs",
editLinks: true,
label: "sdk",
Expand Down Expand Up @@ -146,24 +138,23 @@ module.exports = {
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.",
smallprint: "The development of the Cosmos SDK is led primarily by [Interchain Core Teams](https://interchain.io/ecosystem). Funding for this development comes primarily from the Interchain Foundation, a Swiss non-profit.",
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: "IBC-Go",
url: "https://ibc.cosmos.network"
},
]
},
{
Expand Down
19 changes: 2 additions & 17 deletions docs/DOCS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,13 @@

If you want to open a PR in Cosmos SDK to update the documentation, please follow the guidelines in [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/main/CONTRIBUTING.md#updating-documentation).

## Internationalization

* Translations for documentation live in a `docs/<locale>/` folder, where `<locale>` is the language code for a specific language. For example, `zh` for Chinese, `ko` for Korean, `ru` for Russian, etc.
* Each `docs/<locale>/` folder must follow the same folder structure within `docs/`, but only content in the following folders needs to be translated and included in the respective `docs/<locale>/` folder:
* `docs/basics/`
* `docs/building-modules/`
* `docs/core/`
* `docs/ibc/`
* `docs/intro/`
* `docs/migrations/`
* `docs/run-node/`
* Each `docs/<locale>/` folder must also have a `README.md` that includes a translated version of both the layout and content within the root-level [`README.md`](https://github.com/cosmos/cosmos-sdk/tree/main/docs/README.md). The layout defined in the `README.md` is used to build the homepage.
* Always translate content living on `main` unless you are revising documentation for a specific release. Translated documentation like the root-level documentation is semantically versioned.
* For additional configuration options, please see [VuePress Internationalization](https://vuepress.vuejs.org/guide/i18n.html).

## Docs Build Workflow

The documentation for Cosmos SDK is hosted at https://docs.cosmos.network/ and built from the files in the `/docs` directory.
The documentation for Cosmos SDK is hosted at https://docs.cosmos.network and built from the files in the `/docs` directory.

### How It Works

There is a CircleCI job listening for changes in the `/docs` directory for the `main` branch and each supported version tag (`v0.39` and `v0.42`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a CircleCI job within that repository.
There is a GitHub Action listening for changes in the `/docs` directory for the `main` branch and each supported version branch (e.g. `release/v0.46.x`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a Github Action within that repository.

## README

Expand Down
3 changes: 0 additions & 3 deletions docs/ko/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/ru/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
release/v0.44.x v0.44
release/v0.45.x v0.45
release/v0.46.x v0.46
main master
main main
release/v0.46.x v0.46
3 changes: 0 additions & 3 deletions docs/zh/README.md

This file was deleted.