Skip to content

Commit

Permalink
v0.37.x: Removing all the vuepress related build files and references…
Browse files Browse the repository at this point in the history
… (backport #253) (#263)

* Removing all the vuepress related build files and references  (#253)

* Removing all the vuepress related build files and references (#249)

* Moved documentation ADR to deprecated (#249)

* Reverting the logic for check-docs-toc until ADR/RFC refactor (#249)

* Setting the right permissions to file so workflow executes (#249)

* Reverting ADR change, will do in another issue (#249)

(cherry picked from commit d159562)

# Conflicts:
#	RELEASES.md
#	docs/.vuepress/config.js
#	docs/.vuepress/redirects
#	docs/DOCS_README.md
#	docs/package.json
#	docs/versions

* fix for merge

* fixing to merge

---------

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Co-authored-by: Daniel Cason <daniel.cason@informal.systems>
  • Loading branch information
3 people committed Feb 8, 2023
1 parent 5d2e2db commit 286121d
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 25,651 deletions.
36 changes: 1 addition & 35 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,45 +280,11 @@ vulncheck:

DESTINATION = ./index.html.md


###############################################################################
### Documentation ###
###############################################################################

DOCS_OUTPUT?=/tmp/cometbft-core-docs

# 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. 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.
build-docs:
@cd docs && \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm ci && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p $(DOCS_OUTPUT)/$${path_prefix} ; \
cp -r .vuepress/dist/* $(DOCS_OUTPUT)/$${path_prefix}/ ; \
cp $(DOCS_OUTPUT)/$${path_prefix}/index.html $(DOCS_OUTPUT) ; \
cp $(DOCS_OUTPUT)/$${path_prefix}/404.html $(DOCS_OUTPUT) ; \
cp -r $(DOCS_OUTPUT)/$${path_prefix}/redirects/* $(DOCS_OUTPUT) || true ; \
done < versions ;
.PHONY: build-docs

# Build and serve the local version of the docs on the current branch from
# http://0.0.0.0:8080
serve-docs:
@cd docs && \
npm ci && \
npm run serve
.PHONY: serve-docs

sync-docs:
cd ~/output && \
echo "role_arn = ${DEPLOYMENT_ROLE_ARN}" >> /root/.aws/config ; \
echo "CI job = ${CIRCLE_BUILD_URL}" >> version.html ; \
aws s3 sync . s3://${WEBSITE_BUCKET} --profile terraform --delete ; \
aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --profile terraform --path "/*" ;
.PHONY: sync-docs

# Verify that important design docs have ToC entries.
check-docs-toc:
@./docs/presubmit.sh
Expand Down
10 changes: 0 additions & 10 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,6 @@ Before performing these steps, be sure the
- `git tag -a v0.38.0 -m 'Release v0.38.0'`
- `git push origin v0.38.0`
6. Make sure that `main` is updated with the latest `CHANGELOG.md`, `CHANGELOG_PENDING.md`, and `UPGRADING.md`.
7. Add the release to the documentation site generator config (see
[DOCS\_README.md](./docs/DOCS_README.md) for more details). In summary:
- Start on branch `main`.
- Add a new line at the bottom of [`docs/versions`](./docs/versions) to
ensure the newest release is the default for the landing page.
- Add a new entry to `themeConfig.versions` in
[`docs/.vuepress/config.js`](./docs/.vuepress/config.js) to include the
release in the dropdown versions menu.
- Commit these changes to `main` and backport them into the backport
branch for this release.

## Patch release

Expand Down
9 changes: 0 additions & 9 deletions docs/.textlintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/.vuepress/styles/index.styl

This file was deleted.

95 changes: 4 additions & 91 deletions docs/DOCS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,97 +4,10 @@ The documentation for CometBFT is hosted at:

- <https://docs.cometbft.com>

built from the files in this (`/docs`) directory.
built from the files in these (`/docs` and `/spec`) directories.

## How It Works
Content modified and merged to these folders will be deployed to the `https://docs.cometbft.com` website using workflow logic from the [cometbft-docs](https://github.com/cometbft/cometbft-docs) repository

There is a [GitHub Action](../.github/workflows/docs-deployment.yml) that is
triggered by changes in the `/docs` directory on `main` as well as the branch of
each major supported version (e.g. `v0.34.x`). Any updates to files in this
directory on those branches will automatically trigger a website deployment.
### Building locally

## README

The [README.md](./README.md) is also the landing page for the documentation on
the website.

## Config.js

The [config.js](./.vuepress/config.js) generates the sidebar and Table of
Contents on the website docs. Note the use of relative links and the omission of
file extensions. Additional features are available to improve the look of the
sidebar.

## Links

**NOTE:** Strongly consider the existing links - both within this directory and
to the website docs - when moving or deleting files.

Links to directories _MUST_ end in a `/`.

Relative links should be used nearly everywhere, having discovered and weighed
the following:

### Relative

Where is the other file, relative to the current one?

- works both on GitHub and for the VuePress build
- confusing / annoying to have things like: `../../../../myfile.md`
- requires more updates when files are re-shuffled

### Absolute

Where is the other file, given the root of the repo?

- works on GitHub, doesn't work for the VuePress build
- this is much nicer: `/docs/hereitis/myfile.md`
- if you move that file around, the links inside it are preserved (but not to it, of course)

### Full

The full GitHub URL to a file or directory. Used occasionally when it makes sense
to send users to the GitHub.

## Building Locally

Make sure you are in the `docs` directory and run the following commands:

```bash
rm -rf node_modules
```

This command will remove old version of the visual theme and required packages.
This step is optional.

```bash
npm install
```

Install the theme and all dependencies.

```bash
npm run serve
```

<!-- markdown-link-check-disable -->

Run `pre` and `post` hooks and start a hot-reloading web-server. See output of
this command for the URL (it is often <https://localhost:8080>).

<!-- markdown-link-check-enable -->

To build documentation as a static website run `npm run build`. You will find
the website in `.vuepress/dist` directory.

## Search

We are using [Algolia](https://www.algolia.com) to power full-text search. This
uses a public API search-only key in the `config.js`.

## Consistency

Because the build processes are identical (as is the information contained
herein), this file should be kept in sync as much as possible with its
[counterpart in the Cosmos SDK
repo](https://github.com/cosmos/cosmos-sdk/blob/main/docs/README.md).
For information on how to build the documentation and view it locally, please visit the [cometbft-docs](https://github.com/cometbft/cometbft-docs) Github repository.
3 changes: 1 addition & 2 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ therefore they have links to it and refer to CometBFT as "Tendermint" or "Tender

- [ADR-006: Trust-Metric](./adr-006-trust-metric.md)
- [ADR-024: Sign-Bytes](./adr-024-sign-bytes.md)
- [ADR-035: Documentation](./adr-035-documentation.md)
- [ADR-039: Peer-Behaviour](./adr-039-peer-behaviour.md)
- [ADR-063: Privval-gRPC](./adr-063-privval-grpc.md)
- [ADR-067: Mempool Refactor](./adr-067-mempool-refactor.md)
Expand All @@ -88,7 +87,7 @@ therefore they have links to it and refer to CometBFT as "Tendermint" or "Tender

### Deprecated

None
- [ADR-035: Documentation](./adr-035-documentation.md)

### Rejected

Expand Down
Loading

0 comments on commit 286121d

Please sign in to comment.