Yihau Chen 29fa0b0fcc ci: move docs deploy logic out of build script (#9124) 3 päivää sitten
..
art 14432a4a08 add tvu port binding info to docs (#4948) 8 kuukautta sitten
components 676e80c80a [docs] docs migration (#34096) 1 vuosi sitten
src afb60f70a5 chore: Fix typos (#8681) 3 päivää sitten
static 306f1b69fa Chore: Fix spelling issues (#8438) 1 kuukausi sitten
.eslintignore 545e037e38 Docs cleanup (#16964) 4 vuotta sitten
.eslintrc ffeac298a2 Move from gitbook to docusaurus, build docs in Travis CI (#10970) 5 vuotta sitten
.gitignore c16cdf9488 Remove locale switcher and translation build scripts (#5154) 8 kuukautta sitten
.prettierignore 676e80c80a [docs] docs migration (#34096) 1 vuosi sitten
.prettierrc.json 4a10ebdf0b [docs] style: prettier force line length to 80 chars (#30133) 2 vuotta sitten
README.md f78834e2f3 Update docs with build from source instructions (#7330) 3 kuukautta sitten
babel.config.js ffeac298a2 Move from gitbook to docusaurus, build docs in Travis CI (#10970) 5 vuotta sitten
build-cli-usage.sh a92145707c ci: Remove all travis ci related staffs (#912) 1 vuosi sitten
build.sh 29fa0b0fcc ci: move docs deploy logic out of build script (#9124) 3 päivää sitten
convert-ascii-to-svg.sh 5877e38baa docs: resolve svgbob binary 3 vuotta sitten
deploy.sh 29fa0b0fcc ci: move docs deploy logic out of build script (#9124) 3 päivää sitten
docusaurus.config.js 704f3f7b09 docs: move pages from contributing section (#7255) 3 kuukautta sitten
offline-cmd-md-links.sh b7614abb9e Docs: Update CLI offline cmds (#8548) 5 vuotta sitten
package-lock.json 82fb4b394f build(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /docs (#6517) 2 kuukautta sitten
package.json c23a2bf4bd Update `docs/` dependencies (#5580) 7 kuukautta sitten
publish-docs.sh 3b00fb9a11 fix: update broken documentation redirects in publish-docs.sh (#7402) 3 kuukautta sitten
set-solana-release-tag.sh df97398f0d Update latest release variable for agave docs (#3220) 1 vuosi sitten
sidebars.js 704f3f7b09 docs: move pages from contributing section (#7255) 3 kuukautta sitten

README.md

Solana Validator Docs Readme

This validator's documentation is built using Docusaurus v2 with npm. Static content delivery is handled using vercel.

Note: The documentation within this repo is specifically focused on the Solana validator client maintained by Solana Labs. The more "common" documentation, which is generalized to the Solana protocol as a whole and applies to all Solana validator implementations, is maintained within the developer-content repo. Those "common docs" are managed by the Solana Foundation within their GitHub organization and are publicly accessible via solana.com/docs

Local Development

To set up the Solana Validator Docs site locally:

  • install dependencies using npm
  • build locally via ./build.sh
  • run the local development server
  • make your changes and updates as needed

Note: After cloning this repo to your local machine, all the local development commands are run from within this docs directory.

Install dependencies

Install the site's dependencies via npm:

npm install

Build locally

The build script generates static content into the build directory and can be served using any static content hosting service.

./build.sh

Running this build script requires Docker, and will auto fetch the solanalabs/rust image from Docker hub to compile the desired version of the Solana CLI from source.

This build script will also:

  • generate the cli/usage.md document from the output of each of the Solana CLI commands and sub-commands
  • convert each of the art/*.bob files into SVG images used throughout the docs

Note: Running this build script is required before being able to run the site locally via the npm run start command since it will generate the cli/usage.md document.

If you run into errors or issues with this step, see Common Issues below. See also CI Build Flow for more details on production deployments of the docs.

Local development server

This command starts the Docusaurus local development server and opens up a browser window.

npm run start

Note: Most changes are reflected live without having to restart the server or refresh the page. However, some changes may require a manual refresh of the page or a restart of the development server (via the command above).

CI Build Flow

The docs are built and published in GitHub Actions with the docs.yml workflow. On each PR, the docs are built but not published.

In each post-commit build, docs are built and published using vercel to their respective domain depending on the build branch.

  • Master branch docs are published to edge.docs.anza.xyz
  • Beta branch docs are published to beta.docs.anza.xyz
  • Latest release tag docs are published to docs.anza.xyz

Common Issues

Bad sidebars file (or cli/usage not found)

Error: Bad sidebars file.
These sidebar document ids do not exist:
- cli/usage,

If you have NOT successfully run the build script, then the cli/usage.md file will not exist within your local repo (since it is in .gitignore). Not having this doc file, will result in the error message above.

If the Rust toolchain (specifically cargo) is installed on your system, you can specifically build the cli/usage.md document via:

./build-cli-usage.sh

Or using Docker and the normal build script, you can perform a full production build of the docs to generate this file:

./build.sh

Permission denied for the Docker socket

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post

Running docs build script (./build.sh) required the use of Docker.****

Ensuring you have Docker installed on your system and it is running.

You may also try running either of these build scripts (and by association, Docker) with elevation permissions via sudo:

sudo ./build.sh
# or
sudo ./build-cli-usage.sh

Multiple SVG images not found

Error: Image static/img/***.svg used in src/***.md not found.

During the build process of the docs (specifically within the ./convert-ascii-to-svg.sh script run by ./build.sh), each of the art/*.bob files are converted to SVG images and saved to the static/img directory.

To correct this issue, use the steps above to build the docs locally.

Note: While not generating and saving these SVG images within your local repo will NOT prevent you from running the local development server, it will result in numerous output errors in your terminal.