Skip to content

Commit

Permalink
docs: introduce new documentation layout (#6860)
Browse files Browse the repository at this point in the history
* docs: introduce new layout

* fix: incorrect paths

* chore: added binaries section

* fix: broken links

* chore: cleanup

* chore: setup redirects

* chore: added missing dependency

* chore: upgraded docusaurus

* chore: remove duplicated page

* chore: lints
  • Loading branch information
jeluard authored Jun 7, 2024
1 parent 82a9384 commit 966f3ac
Show file tree
Hide file tree
Showing 42 changed files with 1,752 additions and 330 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ jobs:
- name: Lint built docs
run: yarn docs:lint:fix

- name: Set up Python
uses: actions/setup-python@v1

- name: Build docs
working-directory: docs
run: yarn && yarn build
Expand Down
28 changes: 28 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,34 @@ const config: Config = {
locales: ["en"],
},

plugins: [
[
"@docusaurus/plugin-client-redirects",
{
createRedirects(existingPath: string) {
if (
existingPath.includes("/advanced-topics") ||
existingPath.includes("/getting-started") ||
existingPath.includes("/beacon-management") ||
existingPath.includes("/validator-management") ||
existingPath.includes("/logging-and-metrics") ||
existingPath.includes("/bootnode") ||
existingPath.includes("/data-retention")
) {
return ["/run".concat(existingPath)];
} else if (existingPath.includes("/testing") || existingPath.includes("/tools")) {

This comment has been minimized.

Copy link
@nflaig

nflaig Jun 12, 2024

Member

@jeluard those don't seem to work btw

If you go to https://chainsafe.github.io/lodestar/beacon-management/starting-a-node, it does not redirect but just shows page not found.

image

return ["/contribution".concat(existingPath)];
} else if (existingPath.includes("/lightclient-prover")) {
return ["/libraries".concat(existingPath)];
} else if (existingPath.includes("data-retention.md")) {
return ["/run/beacon-management".concat(existingPath)];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
],

presets: [
[
"classic",
Expand Down
11 changes: 6 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.2.0",
"@docusaurus/preset-classic": "^3.2.0",
"@docusaurus/theme-mermaid": "^3.2.0",
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-client-redirects": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-mermaid": "^3.4.0",
"@easyops-cn/docusaurus-search-local": "^0.40.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
Expand All @@ -25,8 +26,8 @@
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.2.0",
"@docusaurus/types": "^3.2.0"
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/types": "^3.4.0"
},
"browserslist": {
"production": [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 0 additions & 21 deletions docs/pages/getting-started/starting-a-node.new.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ title: Home
### Getting started

- Follow the installation method for [source install](./getting-started/installation.md/#build-from-source) or [Docker install](./getting-started/installation.md/#docker-installation) to install Lodestar. Or use our [Lodestar Quickstart scripts](https://github.com/ChainSafe/lodestar-quickstart).
- Install [binaries](./run/getting-started/installation.md/#binaries), follow the installation method for [source install](./run/getting-started/installation.md/#build-from-source) or [Docker install](./run/getting-started/installation.md/#docker-installation) to install Lodestar. Or use our [Lodestar Quickstart scripts](https://github.com/ChainSafe/lodestar-quickstart).
- Use [Lodestar libraries](./supporting-libraries/index.md) in your next Ethereum Typescript project.
- Run a beacon node on [mainnet or a public testnet](./getting-started/starting-a-node.md).
- Utilize the whole stack by [starting a local testnet](./advanced-topics/setting-up-a-testnet.md).
- View the Lodestar [CLI commands and options](./beacon-management/beacon-cli.md)
- Run a beacon node on [mainnet or a public testnet](./run/beacon-management/starting-a-node.md).
- Utilize the whole stack by [starting a local testnet](./contribution/advanced-topics/setting-up-a-testnet.md).
- View the Lodestar [CLI commands and options](./run/beacon-management/beacon-cli.md)
- Prospective contributors can read the [contributing section](./contribution/getting-started.md) to understand how we develop and test on Lodestar.
- If you have questions [submit an issue](https://github.com/ChainSafe/lodestar/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP)!
- Please note our [security policy](./security.md).
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/pages/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

_**Welcome! This page has been moved. Please checkout our new docs layout from the Table of Contents! Below are some helpful links to the CLI pages that were split out from this original document**_

- [Beacon Node CLI](../beacon-management/beacon-cli.md)
- [Validator CLI](../validator-management/validator-cli.md)
- [Bootnode CLI](../bootnode/bootnode-cli.md)
- [Light Client CLI](../lightclient-prover/lightclient-cli.md)
- [Beacon Node CLI](../run/beacon-management/beacon-cli.md)
- [Validator CLI](../run/validator-management/validator-cli.md)
- [Bootnode CLI](../run/bootnode/bootnode-cli.md)
- [Light Client CLI](../libraries/lightclient-prover/lightclient-cli.md)
- [Dev CLI](../contribution/dev-cli.md)
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Configuring your node to store and prune data is key to success. On average you

`keystores`, `keystore-cache` and `peerstore` are not usually very large and are not expected to grow much during normal operation.

Logs can also become quite large so please check out the section on [log management](./logging-and-metrics/log-management.md) for more information.
Logs can also become quite large so please check out the section on [log management](../logging-and-metrics/log-management.md) for more information.

There is really only one flag that is needed to manage the data for Lodestar, [`--dataDir`](./beacon-management/beacon-cli#--datadir). Other than that handling log management is really the heart of the data management story. Beacon node data is what it is. Depending on the execution client that is chosen, there may be flags to help with data storage growth but that is outside the scope of this document.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Installation

## Binaries

Binaries can be downloaded from [this page](https://github.com/ChainSafe/lodestar/releases/) under the `Assets` section.

## Docker Installation

The [`chainsafe/lodestar`](https://hub.docker.com/r/chainsafe/lodestar) Docker Hub repository is maintained actively. It contains the `lodestar` CLI preinstalled.
Expand Down Expand Up @@ -81,7 +85,7 @@ Lodestar should now be ready for use.
./lodestar --help
```

See [Command Line Reference](./../reference/cli.md) for further information.
See [Command Line Reference](./../../reference/cli.md) for further information.

### Known Issues

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Configuration
title: Stake with a Validator Client
---

# Validator Configuration
Expand Down
121 changes: 61 additions & 60 deletions docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,94 @@ import type {SidebarsConfig} from "@docusaurus/plugin-content-docs";
const sidebars: SidebarsConfig = {
tutorialSidebar: [
"index",
"introduction",
{
type: "doc",
label: "Security",
id: "security",
},
{
type: "category",
label: "Getting Started",
items: ["getting-started/quick-start", "getting-started/installation", "getting-started/starting-a-node"],
},
"data-retention",
{
type: "category",
label: "Beacon Node",
items: [
"beacon-management/beacon-cli",
"beacon-management/networking",
"beacon-management/mev-and-builder-integration",
"beacon-management/syncing",
],
},
{
type: "category",
label: "Validator",
label: "Run A Node",
items: [
"validator-management/validator-cli",
"validator-management/vc-configuration",
"validator-management/external-signer",
"run/getting-started/quick-start",
"run/getting-started/installation",
{
type: "category",
label: "Beacon node",
collapsed: false,
items: [
"run/beacon-management/starting-a-node",
"run/beacon-management/beacon-cli",
"run/beacon-management/data-retention",
"run/beacon-management/networking",
"run/beacon-management/mev-and-builder-integration",
"run/beacon-management/syncing",
],
},
{
type: "category",
label: "Validator Client",
collapsed: false,
items: [
"run/validator-management/vc-configuration",
"run/validator-management/validator-cli",
"run/validator-management/external-signer",
],
},
{
type: "category",
label: "Logging and Metrics",
collapsed: false,
items: ["run/logging-and-metrics/prometheus-grafana", "run/logging-and-metrics/client-monitoring"],
},
{
type: "category",
label: "Discv5 Bootnode",
collapsed: false,
items: ["run/bootnode/bootnode-cli"],
},
],
},
{
type: "category",
label: "Bootnode",
items: ["bootnode/bootnode-cli"],
},
{
type: "category",
label: "Light Client and Prover",
label: "Developer Tools",
collapsed: false,
items: [
"lightclient-prover/lightclient-cli",
{
type: "doc",
label: "Light Client",
id: "lightclient-prover/lightclient",
type: "category",
label: "Lodestar Light Client",
items: ["libraries/lightclient-prover/lightclient-cli", "libraries/lightclient-prover/lightclient"],
},
{
type: "doc",
label: "Prover",
id: "lightclient-prover/prover",
type: "category",
label: "Lodestar Light Prover",
items: ["libraries/lightclient-prover/prover"],
},
],
},
{
type: "category",
label: "Logging and Metrics",
items: ["logging-and-metrics/prometheus-grafana", "logging-and-metrics/client-monitoring"],
},

"supporting-libraries/index",
{
type: "category",
label: "Contributing",
collapsed: false,
items: [
{
type: "doc",
label: "Getting Started",
id: "contribution/getting-started",
type: "category",
label: "Advanced Topics",
collapsed: false,
items: ["contribution/advanced-topics/setting-up-a-testnet"],
},
"contribution/depgraph",
{
type: "doc",
label: "Dev CLI Reference",
id: "contribution/dev-cli",
type: "category",
label: "Development Tools",
items: [
"contribution/tools/debugging",
"contribution/tools/flamegraphs",
"contribution/tools/heap-dumps",
"contribution/tools/core-dumps",
],
},
{
type: "category",
label: "Testing",
collapsed: false,
items: [
"contribution/testing/index",
"contribution/testing/end-to-end-tests",
Expand All @@ -91,16 +102,6 @@ const sidebars: SidebarsConfig = {
},
],
},
{
type: "category",
label: "Tools",
items: ["tools/debugging", "tools/flamegraphs", "tools/heap-dumps", "tools/core-dumps"],
},
{
type: "category",
label: "Advanced Topics",
items: ["advanced-topics/setting-up-a-testnet"],
},
"faqs",
],
};
Expand Down
Loading

0 comments on commit 966f3ac

Please sign in to comment.