From 2246df760256d99c5fb97178410ec4ed8136528a Mon Sep 17 00:00:00 2001 From: danishedb Date: Wed, 26 Aug 2026 18:30:05 +0530 Subject: [PATCH 1/2] review: adapt installation page text and dev-snapshot section to the docs version Signed-off-by: danishedb --- web/docs/installation.mdx | 15 +++------- web/src/components/Installation/index.tsx | 30 +++++++++++++++++++ .../version-0.13.0/installation.mdx | 15 +++------- .../version-0.14.0/installation.mdx | 15 +++------- 4 files changed, 42 insertions(+), 33 deletions(-) diff --git a/web/docs/installation.mdx b/web/docs/installation.mdx index 027d1e8f..01ee3c78 100644 --- a/web/docs/installation.mdx +++ b/web/docs/installation.mdx @@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation. ## Installing the Barman Cloud Plugin -import { InstallationSnippet } from '@site/src/components/Installation'; +import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation'; -Install the plugin using `kubectl` by applying the manifest for the latest -release: +Install the plugin using `kubectl` by applying the manifest for : @@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. -## Testing the latest development snapshot +import { DevSnapshotSection } from '@site/src/components/Installation'; -You can also test the latest development snapshot of the plugin with the -following command: - -```sh -kubectl apply -f \ - https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml -``` + diff --git a/web/src/components/Installation/index.tsx b/web/src/components/Installation/index.tsx index b149709e..255abdd1 100644 --- a/web/src/components/Installation/index.tsx +++ b/web/src/components/Installation/index.tsx @@ -1,6 +1,7 @@ import {ReactElement} from 'react'; import CodeBlock from '@theme/CodeBlock'; import {useActiveVersion} from '@docusaurus/plugin-content-docs/client'; +import Heading from '@theme/Heading'; // InstallationSnippet is the kubectl incantation to install the Barman // Cloud Plugin: the manifest matching the doc version being viewed, or @@ -17,3 +18,32 @@ export function InstallationSnippet(): ReactElement { ); } + +// ManifestVersion names the manifest the snippet below installs: the +// release tag for a versioned docs page, or the main branch on Dev docs. +export function ManifestVersion(): ReactElement { + const activeVersion = useActiveVersion('default'); + return activeVersion && activeVersion.name !== 'current' + ? <>version v{activeVersion.name} + : <>the latest development snapshot from the main branch; +} + + +// DevSnapshotSection offers the main-branch manifest as an alternative; +// on the Dev docs the main install already is that manifest, so hide it. +export function DevSnapshotSection(): ReactElement | null { + const activeVersion = useActiveVersion('default'); + const url = 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml'; + if (!activeVersion || activeVersion.name === 'current') return null; + return ( + <> + + Testing the latest development snapshot + + + {`kubectl apply -f \\ + ${url}`} + + + ); +} diff --git a/web/versioned_docs/version-0.13.0/installation.mdx b/web/versioned_docs/version-0.13.0/installation.mdx index 027d1e8f..01ee3c78 100644 --- a/web/versioned_docs/version-0.13.0/installation.mdx +++ b/web/versioned_docs/version-0.13.0/installation.mdx @@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation. ## Installing the Barman Cloud Plugin -import { InstallationSnippet } from '@site/src/components/Installation'; +import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation'; -Install the plugin using `kubectl` by applying the manifest for the latest -release: +Install the plugin using `kubectl` by applying the manifest for : @@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. -## Testing the latest development snapshot +import { DevSnapshotSection } from '@site/src/components/Installation'; -You can also test the latest development snapshot of the plugin with the -following command: - -```sh -kubectl apply -f \ - https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml -``` + diff --git a/web/versioned_docs/version-0.14.0/installation.mdx b/web/versioned_docs/version-0.14.0/installation.mdx index 027d1e8f..01ee3c78 100644 --- a/web/versioned_docs/version-0.14.0/installation.mdx +++ b/web/versioned_docs/version-0.14.0/installation.mdx @@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation. ## Installing the Barman Cloud Plugin -import { InstallationSnippet } from '@site/src/components/Installation'; +import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation'; -Install the plugin using `kubectl` by applying the manifest for the latest -release: +Install the plugin using `kubectl` by applying the manifest for : @@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. -## Testing the latest development snapshot +import { DevSnapshotSection } from '@site/src/components/Installation'; -You can also test the latest development snapshot of the plugin with the -following command: - -```sh -kubectl apply -f \ - https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml -``` + From 6feb6645b575cca4a48fd2fc62944bfaca816a4f Mon Sep 17 00:00:00 2001 From: danishedb Date: Thu, 27 Aug 2026 11:31:34 +0530 Subject: [PATCH 2/2] review: commiting suggestion from review Signed-off-by: danishedb --- web/docs/installation.mdx | 2 ++ web/src/components/Installation/index.tsx | 28 +++++++++++-------- .../version-0.13.0/installation.mdx | 2 ++ .../version-0.14.0/installation.mdx | 2 ++ 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/web/docs/installation.mdx b/web/docs/installation.mdx index 01ee3c78..4c1c48a3 100644 --- a/web/docs/installation.mdx +++ b/web/docs/installation.mdx @@ -97,6 +97,8 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. +## Testing the latest development snapshot + import { DevSnapshotSection } from '@site/src/components/Installation'; diff --git a/web/src/components/Installation/index.tsx b/web/src/components/Installation/index.tsx index 255abdd1..359bd95f 100644 --- a/web/src/components/Installation/index.tsx +++ b/web/src/components/Installation/index.tsx @@ -1,7 +1,10 @@ import {ReactElement} from 'react'; import CodeBlock from '@theme/CodeBlock'; import {useActiveVersion} from '@docusaurus/plugin-content-docs/client'; -import Heading from '@theme/Heading'; + +// DEV_MANIFEST_URL is the URL of the manifest.yaml on the main branch of the plugin repo. +const DEV_MANIFEST_URL = + 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml'; // InstallationSnippet is the kubectl incantation to install the Barman // Cloud Plugin: the manifest matching the doc version being viewed, or @@ -10,7 +13,7 @@ export function InstallationSnippet(): ReactElement { const activeVersion = useActiveVersion('default'); const url = activeVersion && activeVersion.name !== 'current' ? `https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v${activeVersion.name}/manifest.yaml` - : 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml'; + : DEV_MANIFEST_URL; return ( {`kubectl apply -f \\ @@ -24,25 +27,28 @@ export function InstallationSnippet(): ReactElement { export function ManifestVersion(): ReactElement { const activeVersion = useActiveVersion('default'); return activeVersion && activeVersion.name !== 'current' - ? <>version v{activeVersion.name} + ? v{activeVersion.name} : <>the latest development snapshot from the main branch; } - // DevSnapshotSection offers the main-branch manifest as an alternative; // on the Dev docs the main install already is that manifest, so hide it. -export function DevSnapshotSection(): ReactElement | null { +export function DevSnapshotSection(): ReactElement { const activeVersion = useActiveVersion('default'); - const url = 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml'; - if (!activeVersion || activeVersion.name === 'current') return null; + if (!activeVersion || activeVersion.name === 'current') { + return ( +

The install + command above already applies the latest development + snapshot from the main branch.

+ ); + } return ( <> - - Testing the latest development snapshot - +

You can also test the latest development snapshot of the plugin + with the following command:

{`kubectl apply -f \\ - ${url}`} + ${DEV_MANIFEST_URL}`} ); diff --git a/web/versioned_docs/version-0.13.0/installation.mdx b/web/versioned_docs/version-0.13.0/installation.mdx index 01ee3c78..4c1c48a3 100644 --- a/web/versioned_docs/version-0.13.0/installation.mdx +++ b/web/versioned_docs/version-0.13.0/installation.mdx @@ -97,6 +97,8 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. +## Testing the latest development snapshot + import { DevSnapshotSection } from '@site/src/components/Installation'; diff --git a/web/versioned_docs/version-0.14.0/installation.mdx b/web/versioned_docs/version-0.14.0/installation.mdx index 01ee3c78..4c1c48a3 100644 --- a/web/versioned_docs/version-0.14.0/installation.mdx +++ b/web/versioned_docs/version-0.14.0/installation.mdx @@ -97,6 +97,8 @@ deployment "barman-cloud" successfully rolled out This confirms that the plugin is deployed and ready to use. +## Testing the latest development snapshot + import { DevSnapshotSection } from '@site/src/components/Installation';