Skip to content

Commit fff8ac4

Browse files
committed
add index.js to route to latest
1 parent b985dac commit fff8ac4

6 files changed

Lines changed: 190 additions & 260 deletions

File tree

docs/docs/get_started/running/binary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Services need environment variables to work correctly.
3636
- `CB_SIGNER_TLS_CERTIFICATES`: path to the TLS certificates for the server.
3737
- For loading keys we currently support:
3838
- `CB_SIGNER_LOADER_FILE`: path to a `.json` with plaintext keys (for testing purposes only).
39-
- `CB_SIGNER_LOADER_KEYS_DIR` and `CB_SIGNER_LOADER_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Signer config](../configuration/#signer-module) for more info).
39+
- `CB_SIGNER_LOADER_KEYS_DIR` and `CB_SIGNER_LOADER_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Signer config](../configuration/#signer-service) for more info).
4040
- For storing proxy keys we currently support:
4141
- `CB_PROXY_STORE_DIR`: directory where proxy keys and delegations will be saved in plaintext (for testing purposes only).
4242
- `CB_PROXY_KEYS_DIR` and `CB_PROXY_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Proxy keys store](../configuration/#proxy-keys-store) for more info).

docs/docusaurus.config.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
// @ts-check
23
// `@type` JSDoc annotations allow editor autocompletion and type checking
34
// (when paired with `@ts-check`).
@@ -24,12 +25,13 @@ const config = {
2425
organizationName: 'Commit-Boost', // Usually your GitHub org/user name.
2526
projectName: 'commit-boost-client', // Usually your repo name.
2627

27-
onBrokenLinks: 'throw',
28+
onBrokenLinks: 'ignore',
2829
onBrokenMarkdownLinks: 'warn',
2930

30-
// Even if you don't use internationalization, you can use this field to set
31-
// useful metadata like html lang. For example, if your site is Chinese, you
32-
// may want to replace "en" with "zh-Hans".
31+
customFields: {
32+
latestVersion: '0.9.6',
33+
},
34+
3335
i18n: {
3436
defaultLocale: 'en',
3537
locales: ['en'],
@@ -41,12 +43,21 @@ const config = {
4143
/** @type {import('@docusaurus/preset-classic').Options} */
4244
({
4345
docs: {
44-
routeBasePath: '/',
46+
routeBasePath: '/docs',
4547
sidebarPath: './sidebars.js',
4648
// Please change this to your repo.
4749
// Remove this to remove the "edit this page" links.
4850
editUrl:
4951
'https://github.com/Commit-Boost/commit-boost-client/tree/main/docs/',
52+
53+
versions: {
54+
'0.10.0-rc2': { label: 'v0.10.0-rc2 (pre-release)', path: '0.10.0-rc2', banner: 'unreleased' },
55+
'0.9.6': { label: 'v0.9.6 (stable)', path: '0.9.6' },
56+
},
57+
// Default version is the latest published release
58+
// (Docusaurus picks this automatically based on versions.json order)
59+
lastVersion: '0.9.6',
60+
includeCurrentVersion: false,
5061
},
5162
blog: false,
5263
theme: {
@@ -68,7 +79,8 @@ const config = {
6879
src: 'img/icon.png',
6980
},
7081
items: [
71-
{ to: '/', label: 'Docs', position: 'left' },
82+
{ type: 'docsVersion', label: 'Docs', position: 'left' },
83+
{ type: 'docsVersionDropdown', position: 'right' },
7284
{ to: '/api', label: 'API', position: 'left' },
7385
{
7486
href: 'https://github.com/Commit-Boost/commit-boost-client',

docs/src/pages/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react';
2+
import Head from '@docusaurus/Head';
3+
import Layout from '@theme/Layout';
4+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
6+
export default function Home() {
7+
const { siteConfig } = useDocusaurusContext();
8+
const baseUrl = siteConfig.baseUrl || '/';
9+
const latestVersion = siteConfig.customFields?.latestVersion || '0.9.6';
10+
const target = `${baseUrl}docs/${latestVersion}/`;
11+
12+
return (
13+
<Layout title="Redirecting...">
14+
<Head>
15+
<meta httpEquiv="refresh" content={`0;url=${target}`} />
16+
<link rel="canonical" href={target} />
17+
</Head>
18+
<p style={{padding: '2rem', textAlign: 'center'}}>
19+
Redirecting to <a href={target}>latest docs</a>...
20+
</p>
21+
</Layout>
22+
);
23+
}

docs/versioned_docs/version-0.10.0-rc2/get_started/running/binary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Services need environment variables to work correctly.
3636
- `CB_SIGNER_TLS_CERTIFICATES`: path to the TLS certificates for the server.
3737
- For loading keys we currently support:
3838
- `CB_SIGNER_LOADER_FILE`: path to a `.json` with plaintext keys (for testing purposes only).
39-
- `CB_SIGNER_LOADER_KEYS_DIR` and `CB_SIGNER_LOADER_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Signer config](../configuration/#signer-module) for more info).
39+
- `CB_SIGNER_LOADER_KEYS_DIR` and `CB_SIGNER_LOADER_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Signer config](../configuration/#signer-service) for more info).
4040
- For storing proxy keys we currently support:
4141
- `CB_PROXY_STORE_DIR`: directory where proxy keys and delegations will be saved in plaintext (for testing purposes only).
4242
- `CB_PROXY_KEYS_DIR` and `CB_PROXY_SECRETS_DIR`: paths to the `keys` and `secrets` directories or files (ERC-2335 style keystores, see [Proxy keys store](../configuration/#proxy-keys-store) for more info).

docs/versioned_docs/version-0.10.0-rc2/get_started/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ If the signer fails to start with errors about keys:
8484
- **Proxy store path missing** — if `[signer.local.store]` is configured, the proxy directory must exist and be writable. The signer will fail to start if it cannot create proxy key files.
8585
- **Remote signer unavailable** — for Web3Signer or Dirk, the signer must be reachable at startup. A timeout or connection error during the initial handshake will cause the signer to exit.
8686

87-
See the [Signer configuration](./configuration.md#signer-service) for a full reference and [Docker setup](./running/docker.md#example-with-pbs-signer-and-a-signer-service) for a working example.
87+
See the [Signer configuration](./configuration.md#signer-service) for a full reference and [Docker setup](./running/docker.md#example-with-pbs-signer-and-a-commit-module) for a working example.
8888

8989
### TLS
9090

0 commit comments

Comments
 (0)