Skip to content

Commit

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

* 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:
#	Makefile
#	RELEASES.md
#	docs/.vuepress/config.js
#	docs/.vuepress/redirects
#	docs/DOCS_README.md
#	docs/architecture/README.md
#	docs/package.json
#	docs/versions

* fixing conflicts (#264)

* remove comment leftover from git conflict resolution (#264)

---------

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
  • Loading branch information
mergify[bot] and andynog committed Feb 9, 2023
1 parent d1d4aa1 commit 892516a
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 25,869 deletions.
22 changes: 5 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,27 +204,15 @@ vulncheck:

DESTINATION = ./index.html.md


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

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 ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
done < versions ;
.PHONY: build-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
.PHONY: check-docs-toc

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

This file was deleted.

157 changes: 0 additions & 157 deletions docs/.vuepress/config.js

This file was deleted.

66 changes: 0 additions & 66 deletions docs/.vuepress/redirects

This file was deleted.

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

This file was deleted.

94 changes: 4 additions & 90 deletions docs/DOCS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,97 +4,11 @@ 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
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.

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/master/docs/DOCS_README.md).
Loading

0 comments on commit 892516a

Please sign in to comment.