From aee7ee4a87a0f507fd6c4c96adb307b54af1faf5 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Fri, 18 Oct 2024 14:59:17 -0700 Subject: [PATCH 1/2] docs: backport 4-1 --- .../airgap-install/install.md | 98 ++- .../aws/create-cluster-profile.md | 7 +- .../azure/create-cluster-profile.md | 7 +- .../gcp/create-cluster-profile.md | 7 +- .../vmware/create-cluster-profile.md | 7 +- .../airgap-install/install.md | 98 ++- .../advanced-topics/deploy-import-ova.md | 2 +- docusaurus.config.js | 655 ++++++++++-------- 8 files changed, 546 insertions(+), 335 deletions(-) diff --git a/docs/docs-content/enterprise-version/install-palette/install-on-kubernetes/airgap-install/install.md b/docs/docs-content/enterprise-version/install-palette/install-on-kubernetes/airgap-install/install.md index 47f15cf5ba..4a6aed36a4 100644 --- a/docs/docs-content/enterprise-version/install-palette/install-on-kubernetes/airgap-install/install.md +++ b/docs/docs-content/enterprise-version/install-palette/install-on-kubernetes/airgap-install/install.md @@ -176,7 +176,87 @@ environment. Reach out to our support team if you need assistance. mirrorRegistries: "docker.io::my-oci-registry.com/spectro-images,gcr.io::my-oci-registry.com/spectro-images,ghcr.io::my-oci-registry.com/spectro-images,k8s.gcr.io::my-oci-registry.com/spectro-images,registry.k8s.io::my-oci-registry.com/spectro-images,quay.io::my-oci-registry.com/spectro-images" ``` -7. Go ahead and install the image-swap chart using the following command. Point to the **values.yaml** file you +7. Create an empty YAML file with the name **registry-secret.yaml**. Use the following command to create the file. + + ```shell + touch registry-secret.yaml + ``` + +8. Open the **registry-secret.yaml** file and copy the placeholder configuration below. + + ```yaml + --- + apiVersion: v1 + stringData: + DOMAIN: "REPLACE_WITH_CUSTOM_REGISTRY_DOMAIN" + BASE_PATH: "REPLACE_WITH_CUSTOM_REGISTRY_BASE_PATH" + USERNAME: "REPLACE_WITH_CUSTOM_REGISTRY_USERNAME" + PASSWORD: "REPLACE_WITH_CUSTOM_REGISTRY_PASSWORD" + INSECURE: "false" + CA_CERT: "REPLACE_WITH_CUSTOM_REGISTRY_CA_CERT" + MIRROR_REGISTRIES: REPLACE_WITH_CUSTOM_REGISTRY_MIRROR_REGISTRIES + kind: Secret + metadata: + name: registry-info + namespace: jet-system + type: Opaque + --- + ``` + + :::warning + + Do not change the `kind`, `metadata` and `type` fields in the YAML file. Only replace the placeholder values with + the actual values for your custom image registry as indicated in the table below. + + ::: + +9. Replace the placeholder values with the actual values for your custom image registry. Use the same values that you + used in the `ociImageRegistry` section of the **values.yaml** file for the image-swap Helm chart. Refer to the table + below for a description of each parameter. + + | Parameter | Description | Required | + | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | + | `DOMAIN` | The domain of the custom image registry. | Yes | + | `BASE_PATH` | The base path to the custom image registry. | Yes | + | `USERNAME` | The username to authenticate with the custom image registry. If the custom image registry does not require authentication, you can leave this field empty. | No | + | `PASSWORD` | The password to authenticate with the custom image registry. If the custom image registry does not require authentication, you can leave this field empty. | No | + | `INSECURE` | Set to `true` if the custom image registry uses an insecure connection or a self-signed certificate. Set to `false` if the custom image registry uses a secure connection. | Yes | + | `CA_CERT` | The Certificate Authority of the custom image registry in the PEM format. This is required if the custom image registry uses a self-signed certificate. | No | + | `MIRROR_REGISTRIES` | A comma-separated list of mirror registries in the [image swap format](https://github.com/phenixblue/imageswap-webhook/blob/master/docs/configuration.md) to use for pulling images. For example: `docker.io::harbor.example.org/airgap-images/docker.io,gcr.io::harbor.example.org/airgap-images/gcr.io,ghcr.io::harbor.example.org/airgap-images/ghcr.io,k8s.gcr.io::harbor.example.org/airgap-images/gcr.io,registry.k8s.io::harbor.example.org/airgap-images/k8s.io,quay.io::harbor.example.org/airgap-images/quay.io,us-east1-docker.pkg.dev::harbor.example.org/airgap-images` | Yes | + +
+ + Click here for a complete example configuration. + + ```yaml + --- + apiVersion: v1 + stringData: + DOMAIN: "harbor.example.org" + BASE_PATH: "airgap-images" + USERNAME: "" + PASSWORD: "" + INSECURE: "false" + CA_CERT: "" + MIRROR_REGISTRIES: docker.io::harbor.example.org/airgap-images/docker.io,gcr.io::harbor.example.org/airgap-images/gcr.io,ghcr.io::harbor.example.org/airgap-images/ghcr.io,k8s.gcr.io::harbor.example.org/airgap-images/gcr.io,registry.k8s.io::harbor.example.org/airgap-images/k8s.io,quay.io::harbor.example.org/airgap-images/quay.io,us-east1-docker.pkg.dev::harbor.example.org/airgap-images + kind: Secret + metadata: + name: registry-info + namespace: jet-system + type: Opaque + --- + ``` + +
+ +10. Once you have created the YAML file and configured the parameter values, issue the following command to create the + Kubernetes secret containing the image registry configuration. + + ```shell + kubectl create --filename registry-secret.yaml + ``` + +11. Go ahead and install the image-swap chart using the following command. Point to the **values.yaml** file you configured in steps five through six. ```shell @@ -201,7 +281,7 @@ environment. Reach out to our support team if you need assistance. ::: -8. Open the **values.yaml** file in the **spectro-mgmt-plane** folder with a text editor of your choice. The +12. Open the **values.yaml** file in the **spectro-mgmt-plane** folder with a text editor of your choice. The **values.yaml** file contains the default values for the Palette installation parameters. However, you must populate the following parameters before installing Palette. You can learn more about the parameters on the **values.yaml** file on the [Helm Configuration Reference](../palette-helm-ref.md) page. @@ -704,7 +784,7 @@ environment. Reach out to our support team if you need assistance. ::: -9. This step is only required if you are installing Palette in an environment where a network proxy must be configured +13. This step is only required if you are installing Palette in an environment where a network proxy must be configured for Palette to access the internet. If you are not using a network proxy, skip to the next step. Install the reach-system chart using the following command. Point to the **values.yaml** file you configured in step @@ -725,7 +805,7 @@ environment. Reach out to our support team if you need assistance. TEST SUITE: None ``` -10. Install the Palette Helm Chart using the following command. +14. Install the Palette Helm Chart using the following command. ```shell helm upgrade --values palette/values.yaml \ @@ -742,7 +822,7 @@ environment. Reach out to our support team if you need assistance. TEST SUITE: None ``` -11. Track the installation process using the command below. Palette is ready when the deployments in the namespaces +15. Track the installation process using the command below. Palette is ready when the deployments in the namespaces `cp-system`, `hubble-system`, `ingress-nginx`, `jet-system`, and `ui-system` reach the _Ready_ state. The installation takes two to three minutes to complete. @@ -757,7 +837,7 @@ environment. Reach out to our support team if you need assistance. ::: -12. Create a DNS CNAME record that is mapped to the Palette `ingress-nginx-controller` load balancer. You can use the +16. Create a DNS CNAME record that is mapped to the Palette `ingress-nginx-controller` load balancer. You can use the following command to retrieve the load balancer IP address. You may require the assistance of your network administrator to create the DNS record. @@ -775,7 +855,7 @@ environment. Reach out to our support team if you need assistance. ::: -13. Use the custom domain name or the IP address of the load balancer to visit the Palette system console. To access the +17. Use the custom domain name or the IP address of the load balancer to visit the Palette system console. To access the system console, open a web browser, paste the custom domain URL in the address bar, and append the value `/system`. The first time you visit the Palette system console, a warning message about a not-trusted SSL certificate may @@ -784,7 +864,7 @@ environment. Reach out to our support team if you need assistance. ![Screenshot of the Palette system console showing Username and Password fields.](/palette_installation_install-on-vmware_palette-system-console.webp) -14. Log in to the system console using the following default credentials. +18. Log in to the system console using the following default credentials. | **Parameter** | **Value** | | ------------- | --------- | @@ -794,7 +874,7 @@ environment. Reach out to our support team if you need assistance. After login, you will be prompted to create a new password. Enter a new password and save your changes. You will be redirected to the Palette system console. -15. After login, a summary page is displayed. Palette is installed with a self-signed SSL certificate. To assign a +19. After login, a summary page is displayed. Palette is installed with a self-signed SSL certificate. To assign a different SSL certificate, you must upload the SSL certificate, SSL certificate key, and SSL certificate authority files to Palette. You can upload the files using the Palette system console. Refer to the [Configure HTTPS Encryption](../../../system-management/ssl-certificate-management.md) page for instructions on how diff --git a/docs/docs-content/getting-started/aws/create-cluster-profile.md b/docs/docs-content/getting-started/aws/create-cluster-profile.md index 2fbb582557..3b2651e1e9 100644 --- a/docs/docs-content/getting-started/aws/create-cluster-profile.md +++ b/docs/docs-content/getting-started/aws/create-cluster-profile.md @@ -26,10 +26,9 @@ learn about in the Getting Started section are centered around a fictional case - Follow the steps described in the [Set up Palette with AWS](./setup.md) guide to authenticate Palette for use with your AWS cloud account. -- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) - is available in your Palette environment. Refer to the - [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional - guidance. +- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) is + available in your Palette environment. Refer to the + [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional guidance. ## Create a Full Cluster Profile diff --git a/docs/docs-content/getting-started/azure/create-cluster-profile.md b/docs/docs-content/getting-started/azure/create-cluster-profile.md index 188a03959e..f9fadf5d10 100644 --- a/docs/docs-content/getting-started/azure/create-cluster-profile.md +++ b/docs/docs-content/getting-started/azure/create-cluster-profile.md @@ -26,10 +26,9 @@ learn about in the Getting Started section are centered around a fictional case - Follow the steps described in the [Set up Palette with Azure](./setup.md) guide to authenticate Palette for use with your Azure cloud account. -- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) - is available in your Palette environment. Refer to the - [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional - guidance. +- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) is + available in your Palette environment. Refer to the + [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional guidance. ## Create a Full Cluster Profile diff --git a/docs/docs-content/getting-started/gcp/create-cluster-profile.md b/docs/docs-content/getting-started/gcp/create-cluster-profile.md index c02b4a46d4..e5cd50c972 100644 --- a/docs/docs-content/getting-started/gcp/create-cluster-profile.md +++ b/docs/docs-content/getting-started/gcp/create-cluster-profile.md @@ -26,10 +26,9 @@ learn about in the Getting Started section are centered around a fictional case - Follow the steps described in the [Set up Palette with GCP](./setup.md) guide to authenticate Palette for use with your GCP cloud account. -- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) - is available in your Palette environment. Refer to the - [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional - guidance. +- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) is + available in your Palette environment. Refer to the + [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional guidance. ## Create a Full Cluster Profile diff --git a/docs/docs-content/getting-started/vmware/create-cluster-profile.md b/docs/docs-content/getting-started/vmware/create-cluster-profile.md index 1286af7ec6..ba15b4eaf1 100644 --- a/docs/docs-content/getting-started/vmware/create-cluster-profile.md +++ b/docs/docs-content/getting-started/vmware/create-cluster-profile.md @@ -28,10 +28,9 @@ learn about in the Getting Started section are centered around a fictional case your VMware user account. - Refer to the [Deploy a PCG with Palette CLI](./deploy-pcg.md) guide to create the required infrastructure that enables communication with your cluster. -- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) - is available in your Palette environment. Refer to the - [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional - guidance. +- Ensure that the [Palette Community Registry](../../registries-and-packs/registries-and-packs.md#default-registry) is + available in your Palette environment. Refer to the + [Add OCI Packs Registry](../../registries-and-packs/oci-registry/oci-registry.md) guide for additional guidance. ## Create a Full Cluster Profile diff --git a/docs/docs-content/vertex/install-palette-vertex/install-on-kubernetes/airgap-install/install.md b/docs/docs-content/vertex/install-palette-vertex/install-on-kubernetes/airgap-install/install.md index 8978bfa52d..95e5a094fa 100644 --- a/docs/docs-content/vertex/install-palette-vertex/install-on-kubernetes/airgap-install/install.md +++ b/docs/docs-content/vertex/install-palette-vertex/install-on-kubernetes/airgap-install/install.md @@ -176,7 +176,87 @@ environment. Reach out to our support team if you need assistance. mirrorRegistries: "docker.io::my-oci-registry.com/spectro-images,gcr.io::my-oci-registry.com/spectro-images,ghcr.io::my-oci-registry.com/spectro-images,k8s.gcr.io::my-oci-registry.com/spectro-images,registry.k8s.io::my-oci-registry.com/spectro-images,quay.io::my-oci-registry.com/spectro-images" ``` -7. Go ahead and install the image-swap chart using the following command. Point to the **values.yaml** file you +7. Create an empty YAML file with the name **registry-secret.yaml**. Use the following command to create the file. + + ```shell + touch registry-secret.yaml + ``` + +8. Open the **registry-secret.yaml** file and copy the placeholder configuration below. + + ```yaml + --- + apiVersion: v1 + stringData: + DOMAIN: "REPLACE_WITH_CUSTOM_REGISTRY_DOMAIN" + BASE_PATH: "REPLACE_WITH_CUSTOM_REGISTRY_BASE_PATH" + USERNAME: "REPLACE_WITH_CUSTOM_REGISTRY_USERNAME" + PASSWORD: "REPLACE_WITH_CUSTOM_REGISTRY_PASSWORD" + INSECURE: "false" + CA_CERT: "REPLACE_WITH_CUSTOM_REGISTRY_CA_CERT" + MIRROR_REGISTRIES: REPLACE_WITH_CUSTOM_REGISTRY_MIRROR_REGISTRIES + kind: Secret + metadata: + name: registry-info + namespace: jet-system + type: Opaque + --- + ``` + + :::warning + + Do not change the `kind`, `metadata` and `type` fields in the YAML file. Only replace the placeholder values with + the actual values for your custom image registry as indicated in the table below. + + ::: + +9. Replace the placeholder values with the actual values for your custom image registry. Use the same values that you + used in the `ociImageRegistry` section of the **values.yaml** file for the image-swap Helm chart. Refer to the table + below for a description of each parameter. + + | Parameter | Description | Required | + | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | + | `DOMAIN` | The domain of the custom image registry. | Yes | + | `BASE_PATH` | The base path to the custom image registry. | Yes | + | `USERNAME` | The username to authenticate with the custom image registry. If the custom image registry does not require authentication, you can leave this field empty. | No | + | `PASSWORD` | The password to authenticate with the custom image registry. If the custom image registry does not require authentication, you can leave this field empty. | No | + | `INSECURE` | Set to `true` if the custom image registry uses an insecure connection or a self-signed certificate. Set to `false` if the custom image registry uses a secure connection. | Yes | + | `CA_CERT` | The Certificate Authority of the custom image registry in the PEM format. This is required if the custom image registry uses a self-signed certificate. | No | + | `MIRROR_REGISTRIES` | A comma-separated list of mirror registries in the [image swap format](https://github.com/phenixblue/imageswap-webhook/blob/master/docs/configuration.md) to use for pulling images. For example: `docker.io::harbor.example.org/airgap-images/docker.io,gcr.io::harbor.example.org/airgap-images/gcr.io,ghcr.io::harbor.example.org/airgap-images/ghcr.io,k8s.gcr.io::harbor.example.org/airgap-images/gcr.io,registry.k8s.io::harbor.example.org/airgap-images/k8s.io,quay.io::harbor.example.org/airgap-images/quay.io,us-east1-docker.pkg.dev::harbor.example.org/airgap-images` | Yes | + +
+ + Click here for a complete example configuration. + + ```yaml + --- + apiVersion: v1 + stringData: + DOMAIN: "harbor.example.org" + BASE_PATH: "airgap-images" + USERNAME: "" + PASSWORD: "" + INSECURE: "false" + CA_CERT: "" + MIRROR_REGISTRIES: docker.io::harbor.example.org/airgap-images/docker.io,gcr.io::harbor.example.org/airgap-images/gcr.io,ghcr.io::harbor.example.org/airgap-images/ghcr.io,k8s.gcr.io::harbor.example.org/airgap-images/gcr.io,registry.k8s.io::harbor.example.org/airgap-images/k8s.io,quay.io::harbor.example.org/airgap-images/quay.io,us-east1-docker.pkg.dev::harbor.example.org/airgap-images + kind: Secret + metadata: + name: registry-info + namespace: jet-system + type: Opaque + --- + ``` + +
+ +10. Once you have created the YAML file and configured the parameter values, issue the following command to create the + Kubernetes secret containing the image registry configuration. + + ```shell + kubectl create --filename registry-secret.yaml + ``` + +11. Go ahead and install the image-swap chart using the following command. Point to the **values.yaml** file you configured in steps five through six. ```shell @@ -201,7 +281,7 @@ environment. Reach out to our support team if you need assistance. ::: -8. Open the **values.yaml** file in the **spectro-mgmt-plane** folder with a text editor of your choice. The +12. Open the **values.yaml** file in the **spectro-mgmt-plane** folder with a text editor of your choice. The **values.yaml** file contains the default values for the Palette installation parameters. However, you must populate the following parameters before installing Palette. You can learn more about the parameters on the **values.yaml** file on the [Helm Configuration Reference](../vertex-helm-ref.md) page. @@ -714,7 +794,7 @@ environment. Reach out to our support team if you need assistance. ::: -9. This step is only required if you are installing VerteX in an environment where a network proxy must be configured +13. This step is only required if you are installing VerteX in an environment where a network proxy must be configured for VerteX to access the internet. If you are not using a network proxy, skip to the next step. Install the reach-system chart using the following command. Point to the **values.yaml** file you configured in the @@ -735,7 +815,7 @@ environment. Reach out to our support team if you need assistance. TEST SUITE: None ``` -10. Install the VerteX Helm Chart using the following command. +14. Install the VerteX Helm Chart using the following command. ```shell helm upgrade --values vertex/values.yaml \ @@ -752,7 +832,7 @@ environment. Reach out to our support team if you need assistance. TEST SUITE: None ``` -11. Track the installation process using the command below. VerteX is ready when the deployments in the namespaces +15. Track the installation process using the command below. VerteX is ready when the deployments in the namespaces `cp-system`, `hubble-system`, `ingress-nginx`, `jet-system`, and `ui-system` reach the _Ready_ state. The installation takes between two to three minutes to complete. @@ -767,7 +847,7 @@ environment. Reach out to our support team if you need assistance. ::: -12. Create a DNS CNAME record that is mapped to the VerteX `ingress-nginx-controller` load balancer. You can use the +16. Create a DNS CNAME record that is mapped to the VerteX `ingress-nginx-controller` load balancer. You can use the following command to retrieve the load balancer IP address. You may require the assistance of your network administrator to create the DNS record. @@ -785,7 +865,7 @@ environment. Reach out to our support team if you need assistance. ::: -13. Use the custom domain name or the IP address of the load balancer to visit the VerteX system console. To access the +17. Use the custom domain name or the IP address of the load balancer to visit the VerteX system console. To access the system console, open a web browser, paste the custom domain URL in the address bar, and append the value `/system`. The first time you visit the VerteX system console, a warning message about a not-trusted SSL certificate may @@ -794,7 +874,7 @@ environment. Reach out to our support team if you need assistance. ![Screenshot of the VerteX system console showing Username and Password fields.](/vertex_install-on-kubernetes_install_system-console.webp) -14. Log in to the system console using the following default credentials. +18. Log in to the system console using the following default credentials. | **Parameter** | **Value** | | ------------- | --------- | @@ -804,7 +884,7 @@ environment. Reach out to our support team if you need assistance. After login, you will be prompted to create a new password. Enter a new password and save your changes. You will be redirected to the VerteX system console. -15. After login, a summary page is displayed. VerteX is installed with a self-signed SSL certificate. To assign a +19. After login, a summary page is displayed. VerteX is installed with a self-signed SSL certificate. To assign a different SSL certificate, you must upload the SSL certificate, SSL certificate key, and SSL certificate authority files to VerteX. You can upload the files using the VerteX system console. Refer to the [Configure HTTPS Encryption](../../../system-management/ssl-certificate-management.md) page for instructions on how diff --git a/docs/docs-content/vm-management/create-manage-vm/advanced-topics/deploy-import-ova.md b/docs/docs-content/vm-management/create-manage-vm/advanced-topics/deploy-import-ova.md index 7ff5b96ab1..8afd82ba9e 100644 --- a/docs/docs-content/vm-management/create-manage-vm/advanced-topics/deploy-import-ova.md +++ b/docs/docs-content/vm-management/create-manage-vm/advanced-topics/deploy-import-ova.md @@ -257,7 +257,7 @@ name, for example `cdi-uploadproxy.mycompany.io`, to the Nginx load balancer’s | **Parameter** | **Description** | **Values** | | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | - | **OVA Path** | The path to the OVA you uploaded to your VM. The path for the example provided is `/root/bitnami-wordpress-6.2.2-r1-debian-11-amd64.ova/`. | | + | **OVA Path** | The path to the OVA you uploaded to your VM. The path for the example provided is `/root/bitnami-wordpress-6.2.2-r1-debian-11-amd64.ova/`. | | | **Container Disk Upload Method** | Indicate whether to upload the image directly to the target cluster as a `DataVolume` or build and push a Docker image. You will need to provide an existing image registry if you select Docker. | `DataVolume` / `Docker Image` | | **Kubeconfig Path** | The path to the kubeconfig file you have uploaded to your VM. | | | **DataVolume Namespace** | The namespace to create your `DataVolume`, if you selected this option previously. | | diff --git a/docusaurus.config.js b/docusaurus.config.js index 9a177b5d59..61193f6ff0 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,12 +5,8 @@ const themes = require("prism-react-renderer").themes; const lightCodeTheme = themes.oceanicNext; const darkCodeTheme = themes.dracula; const redirects = require("./redirects"); -const { - pluginPacksAndIntegrationsData -} = require("./plugins/packs-integrations"); -const { - pluginImportFontAwesomeIcons -} = require("./plugins/font-awesome"); +const { pluginPacksAndIntegrationsData } = require("./plugins/packs-integrations"); +const { pluginImportFontAwesomeIcons } = require("./plugins/font-awesome"); import path from "path"; import { Logger } from "sass"; @@ -36,318 +32,377 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", - locales: ["en"] + locales: ["en"], }, staticDirectories: ["static", "static/assets/docs/images", "static/assets"], - headTags: [{ - tagName: "script", - attributes: { - type: "text/plain", - "data-usercentrics": "FullStory", - src: "/scripts/fullstory.js" - } - }, { - tagName: "link", - attributes: { - rel: "preconnect", - href: "https://api.usercentrics.eu" - } - }, { - tagName: "link", - attributes: { - rel: "preload", - href: "https://app.usercentrics.eu/browser-ui/latest/loader.js", - as: "script" - } - }, { - tagName: "script", - attributes: { - src: "https://app.usercentrics.eu/browser-ui/latest/loader.js", - "data-settings-id": "0IhiFXOBwy0Z2U", - id: "usercentrics-cmp", - async: "true" - } - }, { - tagName: "link", - attributes: { - rel: "preconnect", - href: "https://www.googletagmanager.com" - } - }, { - tagName: "script", - attributes: { - type: "text/javascript", - "data-usercentrics": "Google Tag Manager", - src: "/scripts/googleTagManager.js" - } - }], - stylesheets: [], - presets: [["classic", /** @type {import('@docusaurus/preset-classic').Options} */ - { - docs: { - path: "docs/docs-content", - showLastUpdateAuthor: false, - showLastUpdateTime: true, - routeBasePath: "/", - lastVersion: "current", - includeCurrentVersion: true, - versions: { - current: { - label: "latest" - } + headTags: [ + { + tagName: "script", + attributes: { + type: "text/plain", + "data-usercentrics": "FullStory", + src: "/scripts/fullstory.js", }, - admonitions: { - keywords: ["preview", "further"], - extendDefaults: true + }, + { + tagName: "link", + attributes: { + rel: "preconnect", + href: "https://api.usercentrics.eu", }, - // exclude: ["api/v1/palette-apis-3-4"], - - sidebarPath: require.resolve("./sidebars.js"), - async sidebarItemsGenerator({ - defaultSidebarItemsGenerator, - ...args - }) { - const { - docs - } = args; - const filteredDocs = docs.filter(doc => { - return true; - }); - const sidebarItems = await defaultSidebarItemsGenerator({ - ...args, - docs: filteredDocs - }); - return sidebarItems; + }, + { + tagName: "link", + attributes: { + rel: "preload", + href: "https://app.usercentrics.eu/browser-ui/latest/loader.js", + as: "script", }, - editUrl: "https://github.com/spectrocloud/librarium/blob/master" }, - sitemap: { - changefreq: "daily", - priority: 0.5, - ignorePatterns: ["/tags/**"], - filename: "sitemap.xml" + { + tagName: "script", + attributes: { + src: "https://app.usercentrics.eu/browser-ui/latest/loader.js", + "data-settings-id": "0IhiFXOBwy0Z2U", + id: "usercentrics-cmp", + async: "true", + }, }, - theme: { - customCss: require.resolve("./src/css/custom.scss") - } - }]], - plugins: ["docusaurus-plugin-sass", ["@docusaurus/plugin-content-docs", { - id: "api", - path: "docs/api-content/api-docs", - routeBasePath: "api", - docItemComponent: "@theme/ApiItem", - lastVersion: "current", - includeCurrentVersion: true, - admonitions: { - keywords: ["preview", "further"], - extendDefaults: true + { + tagName: "link", + attributes: { + rel: "preconnect", + href: "https://www.googletagmanager.com", + }, }, - versions: { - current: { - label: "latest" - } + { + tagName: "script", + attributes: { + type: "text/javascript", + "data-usercentrics": "Google Tag Manager", + src: "/scripts/googleTagManager.js", + }, }, - sidebarPath: require.resolve("./apisidebar.js") - }], ["docusaurus-plugin-openapi-docs", { - // Visit https://docusaurus-openapi.tryingpan.dev/#config to learn more about this plugin's config options. - id: "apidocs", - docsPluginId: "api", - config: { - palette: { - specPath: "docs/api-content/api-docs/v1/api.json", - outputDir: "docs/api-content/api-docs/v1", - downloadUrl: "https://github.com/spectrocloud/librarium/blob/master/docs/api-content/api-docs/palette-apis.json", - sidebarOptions: { - groupPathsBy: "tag", - categoryLinkSource: "tag" + ], + stylesheets: [], + presets: [ + [ + "classic", + /** @type {import('@docusaurus/preset-classic').Options} */ + { + docs: { + path: "docs/docs-content", + showLastUpdateAuthor: false, + showLastUpdateTime: true, + routeBasePath: "/", + lastVersion: "current", + includeCurrentVersion: true, + versions: { + current: { + label: "latest", + }, + }, + admonitions: { + keywords: ["preview", "further"], + extendDefaults: true, + }, + // exclude: ["api/v1/palette-apis-3-4"], + + sidebarPath: require.resolve("./sidebars.js"), + async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) { + const { docs } = args; + const filteredDocs = docs.filter((doc) => { + return true; + }); + const sidebarItems = await defaultSidebarItemsGenerator({ + ...args, + docs: filteredDocs, + }); + return sidebarItems; + }, + editUrl: "https://github.com/spectrocloud/librarium/blob/master", + }, + sitemap: { + changefreq: "daily", + priority: 0.5, + ignorePatterns: ["/tags/**"], + filename: "sitemap.xml", + }, + theme: { + customCss: require.resolve("./src/css/custom.scss"), + }, + }, + ], + ], + plugins: [ + "docusaurus-plugin-sass", + [ + "@docusaurus/plugin-content-docs", + { + id: "api", + path: "docs/api-content/api-docs", + routeBasePath: "api", + docItemComponent: "@theme/ApiItem", + lastVersion: "current", + includeCurrentVersion: true, + admonitions: { + keywords: ["preview", "further"], + extendDefaults: true, }, - template: "api.mustache", - // Customize API MDX with mustache template - hideSendButton: true - } - } - }], process.env.NODE_ENV !== "production" && [() => ({ - name: "plugin-enable-source-map", - configureWebpack() { + versions: { + current: { + label: "latest", + }, + }, + sidebarPath: require.resolve("./apisidebar.js"), + }, + ], + [ + "docusaurus-plugin-openapi-docs", + { + // Visit https://docusaurus-openapi.tryingpan.dev/#config to learn more about this plugin's config options. + id: "apidocs", + docsPluginId: "api", + config: { + palette: { + specPath: "docs/api-content/api-docs/v1/api.json", + outputDir: "docs/api-content/api-docs/v1", + downloadUrl: + "https://github.com/spectrocloud/librarium/blob/master/docs/api-content/api-docs/palette-apis.json", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", + }, + template: "api.mustache", + // Customize API MDX with mustache template + hideSendButton: true, + }, + }, + }, + ], + process.env.NODE_ENV !== "production" && [ + () => ({ + name: "plugin-enable-source-map", + configureWebpack() { + return { + devtool: "source-map", + }; + }, + }), + { + id: "enable-source-map", + }, + ], + [ + pluginPacksAndIntegrationsData, + { + repositories: ["Palette Registry", "Public Repo", "Spectro Addon Repo", "Palette Community Registry"], + }, + ], + pluginImportFontAwesomeIcons, + function () { return { - devtool: "source-map" + name: "plugin-watch-custom-plugin-path", + getPathsToWatch() { + return ["plugins/font-awesome.js", "plugins/packs-integrations.js"]; + }, }; - } - }), { - id: "enable-source-map" - }], [pluginPacksAndIntegrationsData, { - repositories: ["Palette Registry", "Public Repo", "Spectro Addon Repo", "Palette Community Registry"] - }], pluginImportFontAwesomeIcons, function () { - return { - name: "plugin-watch-custom-plugin-path", - getPathsToWatch() { - return ["plugins/font-awesome.js", "plugins/packs-integrations.js"]; - } - }; - }, ["@docusaurus/plugin-ideal-image", { - quality: 50, - max: 1035, - steps: 4, - disableInDev: false - }], [require.resolve("docusaurus-plugin-image-zoom"), { - id: "docusaurus-plugin-image-zoom" - }], ["@docusaurus/plugin-client-redirects", { - redirects: [...redirects] - }]].filter(Boolean), - scripts: [{ - src: `https://w.appzi.io/w.js?token=${process.env.APPZI_TOKEN}`, - defer: true - }], + }, + [ + "@docusaurus/plugin-ideal-image", + { + quality: 50, + max: 1035, + steps: 4, + disableInDev: false, + }, + ], + [ + require.resolve("docusaurus-plugin-image-zoom"), + { + id: "docusaurus-plugin-image-zoom", + }, + ], + [ + "@docusaurus/plugin-client-redirects", + { + redirects: [...redirects], + }, + ], + ].filter(Boolean), + scripts: [ + { + src: `https://w.appzi.io/w.js?token=${process.env.APPZI_TOKEN}`, + defer: true, + }, + ], themes: ["docusaurus-theme-openapi-docs"], customFields: { // Put your custom environment here }, - themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - { - // announcementBar: { - // id: "docs_announcement_bar", - // content: - // REPLACE MESSAGE BELOW - // 'The 2024 State of Production Kubernetes report is now available and it\'s full of insights and goodies. Click here to get your own copy.', - // backgroundColor: "#FBB117", - // textColor: "#091E42", - // isCloseable: false, - // }, - colorMode: { - respectPrefersColorScheme: true - }, - docs: { + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + { + // announcementBar: { + // id: "docs_announcement_bar", + // content: + // REPLACE MESSAGE BELOW + // 'The 2024 State of Production Kubernetes report is now available and it\'s full of insights and goodies. Click here to get your own copy.', + // backgroundColor: "#FBB117", + // textColor: "#091E42", + // isCloseable: false, + // }, + colorMode: { + respectPrefersColorScheme: true, + }, + docs: { + sidebar: { + hideable: false, + autoCollapseCategories: true, + }, + }, + tableOfContents: { + minHeadingLevel: 2, + maxHeadingLevel: 3, + }, + // Replace with your project's social card + image: "img/spectro-cloud-social-card.png", + navbar: { + title: "", + logo: { + href: "/", + target: "self", + width: 144, + height: 36, + alt: "Spectro cloud logo", + src: "img/spectrocloud-logo-light.svg", + srcDark: "img/spectrocloud-logo-dark.svg", + }, + items: [ + { + to: "/", + type: "docSidebar", + sidebarId: "docSidebar", + label: "Docs", + position: "left", + activeBaseRegex: "^(?!/api/).*$", + }, + { + to: "/tutorials", + type: "docSidebar", + sidebarId: "tutorialSidebar", + label: "Tutorials", + position: "left", + activeBaseRegex: "^(?!/api/).*$", + }, + { + to: "/api/introduction", + label: "API", + position: "left", + }, + { + href: "https://github.com/spectrocloud/librarium", + position: "right", + className: "header-github-link", + "aria-label": "GitHub repository", + }, + { + type: "docsVersionDropdown", + position: "left", + docsPluginId: "default", + }, + { + type: "docsVersionDropdown", + position: "left", + docsPluginId: "api", + }, + ], + hideOnScroll: true, + }, + languageTabs: [ + { + highlight: "bash", + language: "curl", + logoClass: "bash", + }, + { + highlight: "python", + language: "python", + logoClass: "python", + variant: "requests", + }, + { + highlight: "go", + language: "go", + logoClass: "go", + }, + { + highlight: "javascript", + language: "nodejs", + logoClass: "nodejs", + variant: "axios", + }, + { + highlight: "java", + language: "java", + logoClass: "java", + variant: "unirest", + }, + ], + algolia: { + // The application ID provided by Algolia + appId: process.env.ALGOLIA_APP_ID, + // Public API key: it is safe to commit it + apiKey: process.env.ALGOLIA_SEARCH_KEY, + indexName: process.env.ALGOLIA_INDEX_NAME, + // Optional: see doc section below + contextualSearch: true, + // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. + externalUrlRegex: "external\\.com|domain\\.com", + // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs + replaceSearchResultPathname: { + from: "/docs/", + // or as RegExp: /\/docs\// + to: "/", + }, + // Optional: Algolia search parameters + searchParameters: {}, + // Optional: path for search page that enabled by default (`false` to disable it) + searchPagePath: "search", + maxResultsPerGroup: 7, + }, sidebar: { - hideable: false, - autoCollapseCategories: true - } - }, - tableOfContents: { - minHeadingLevel: 2, - maxHeadingLevel: 3 - }, - // Replace with your project's social card - image: "img/spectro-cloud-social-card.png", - navbar: { - title: "", - logo: { - href: "/", - target: "self", - width: 144, - height: 36, - alt: "Spectro cloud logo", - src: "img/spectrocloud-logo-light.svg", - srcDark: "img/spectrocloud-logo-dark.svg" + hideable: true, }, - items: [{ - to: "/", - type: "docSidebar", - sidebarId: "docSidebar", - label: "Docs", - position: "left", - activeBaseRegex: "^(?!/api/).*$" - }, { - to: "/tutorials", - type: "docSidebar", - sidebarId: "tutorialSidebar", - label: "Tutorials", - position: "left", - activeBaseRegex: "^(?!/api/).*$" - }, { - to: "/api/introduction", - label: "API", - position: "left" - }, { - href: "https://github.com/spectrocloud/librarium", - position: "right", - className: "header-github-link", - "aria-label": "GitHub repository" - }, { - type: "docsVersionDropdown", - position: "left", - docsPluginId: "default" - }, { - type: "docsVersionDropdown", - position: "left", - docsPluginId: "api" - }], - hideOnScroll: true - }, - languageTabs: [{ - highlight: "bash", - language: "curl", - logoClass: "bash" - }, { - highlight: "python", - language: "python", - logoClass: "python", - variant: "requests" - }, { - highlight: "go", - language: "go", - logoClass: "go" - }, { - highlight: "javascript", - language: "nodejs", - logoClass: "nodejs", - variant: "axios" - }, { - highlight: "java", - language: "java", - logoClass: "java", - variant: "unirest" - }], - algolia: { - // The application ID provided by Algolia - appId: process.env.ALGOLIA_APP_ID, - // Public API key: it is safe to commit it - apiKey: process.env.ALGOLIA_SEARCH_KEY, - indexName: process.env.ALGOLIA_INDEX_NAME, - // Optional: see doc section below - contextualSearch: true, - // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. - externalUrlRegex: "external\\.com|domain\\.com", - // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs - replaceSearchResultPathname: { - from: "/docs/", - // or as RegExp: /\/docs\// - to: "/" + prism: { + defaultLanguage: "json", + theme: lightCodeTheme, + darkTheme: darkCodeTheme, + additionalLanguages: ["hcl", "bash", "json", "powershell", "go", "javascript", "rust"], + magicComments: [ + { + className: "theme-code-block-highlighted-line", + line: "highlight-next-line", + block: { + start: "highlight-start", + end: "highlight-end", + }, + }, + { + className: "code-block-error-line", + line: "This will error", + }, + ], }, - // Optional: Algolia search parameters - searchParameters: {}, - // Optional: path for search page that enabled by default (`false` to disable it) - searchPagePath: "search", - maxResultsPerGroup: 7 - }, - sidebar: { - hideable: true - }, - prism: { - defaultLanguage: "json", - theme: lightCodeTheme, - darkTheme: darkCodeTheme, - additionalLanguages: ["hcl", "bash", "json", "powershell", "go", "javascript", "rust"], - magicComments: [{ - className: "theme-code-block-highlighted-line", - line: "highlight-next-line", - block: { - start: "highlight-start", - end: "highlight-end" - } - }, { - className: "code-block-error-line", - line: "This will error" - }] - }, - zoom: { - selector: ".markdown-image", - background: { - light: "rgb(255, 255, 255)", - dark: "rgb(50, 50, 50)" + zoom: { + selector: ".markdown-image", + background: { + light: "rgb(255, 255, 255)", + dark: "rgb(50, 50, 50)", + }, + config: {}, }, - config: {} - } - } + }, }; module.exports = config; export default function (context, options) { @@ -356,6 +411,6 @@ export default function (context, options) { getPathsToWatch() { const contentPath = path.resolve(context.siteDir, options.path); return [`${contentPath}/_partials/*/*.{mdx}`]; - } + }, }; -} \ No newline at end of file +} From 623b61d70a6e739f9731308d819230c6057ab2c5 Mon Sep 17 00:00:00 2001 From: karl-cardenas-coding Date: Fri, 18 Oct 2024 22:01:54 +0000 Subject: [PATCH 2/2] ci: adding missing robots.txt or updating noindex in docusaurus.config.js --- docusaurus.config.js | 655 ++++++++++++++++++++----------------------- 1 file changed, 300 insertions(+), 355 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 61193f6ff0..9a177b5d59 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,8 +5,12 @@ const themes = require("prism-react-renderer").themes; const lightCodeTheme = themes.oceanicNext; const darkCodeTheme = themes.dracula; const redirects = require("./redirects"); -const { pluginPacksAndIntegrationsData } = require("./plugins/packs-integrations"); -const { pluginImportFontAwesomeIcons } = require("./plugins/font-awesome"); +const { + pluginPacksAndIntegrationsData +} = require("./plugins/packs-integrations"); +const { + pluginImportFontAwesomeIcons +} = require("./plugins/font-awesome"); import path from "path"; import { Logger } from "sass"; @@ -32,377 +36,318 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", - locales: ["en"], + locales: ["en"] }, staticDirectories: ["static", "static/assets/docs/images", "static/assets"], - headTags: [ - { - tagName: "script", - attributes: { - type: "text/plain", - "data-usercentrics": "FullStory", - src: "/scripts/fullstory.js", + headTags: [{ + tagName: "script", + attributes: { + type: "text/plain", + "data-usercentrics": "FullStory", + src: "/scripts/fullstory.js" + } + }, { + tagName: "link", + attributes: { + rel: "preconnect", + href: "https://api.usercentrics.eu" + } + }, { + tagName: "link", + attributes: { + rel: "preload", + href: "https://app.usercentrics.eu/browser-ui/latest/loader.js", + as: "script" + } + }, { + tagName: "script", + attributes: { + src: "https://app.usercentrics.eu/browser-ui/latest/loader.js", + "data-settings-id": "0IhiFXOBwy0Z2U", + id: "usercentrics-cmp", + async: "true" + } + }, { + tagName: "link", + attributes: { + rel: "preconnect", + href: "https://www.googletagmanager.com" + } + }, { + tagName: "script", + attributes: { + type: "text/javascript", + "data-usercentrics": "Google Tag Manager", + src: "/scripts/googleTagManager.js" + } + }], + stylesheets: [], + presets: [["classic", /** @type {import('@docusaurus/preset-classic').Options} */ + { + docs: { + path: "docs/docs-content", + showLastUpdateAuthor: false, + showLastUpdateTime: true, + routeBasePath: "/", + lastVersion: "current", + includeCurrentVersion: true, + versions: { + current: { + label: "latest" + } }, - }, - { - tagName: "link", - attributes: { - rel: "preconnect", - href: "https://api.usercentrics.eu", + admonitions: { + keywords: ["preview", "further"], + extendDefaults: true }, - }, - { - tagName: "link", - attributes: { - rel: "preload", - href: "https://app.usercentrics.eu/browser-ui/latest/loader.js", - as: "script", + // exclude: ["api/v1/palette-apis-3-4"], + + sidebarPath: require.resolve("./sidebars.js"), + async sidebarItemsGenerator({ + defaultSidebarItemsGenerator, + ...args + }) { + const { + docs + } = args; + const filteredDocs = docs.filter(doc => { + return true; + }); + const sidebarItems = await defaultSidebarItemsGenerator({ + ...args, + docs: filteredDocs + }); + return sidebarItems; }, + editUrl: "https://github.com/spectrocloud/librarium/blob/master" }, - { - tagName: "script", - attributes: { - src: "https://app.usercentrics.eu/browser-ui/latest/loader.js", - "data-settings-id": "0IhiFXOBwy0Z2U", - id: "usercentrics-cmp", - async: "true", - }, + sitemap: { + changefreq: "daily", + priority: 0.5, + ignorePatterns: ["/tags/**"], + filename: "sitemap.xml" }, - { - tagName: "link", - attributes: { - rel: "preconnect", - href: "https://www.googletagmanager.com", - }, + theme: { + customCss: require.resolve("./src/css/custom.scss") + } + }]], + plugins: ["docusaurus-plugin-sass", ["@docusaurus/plugin-content-docs", { + id: "api", + path: "docs/api-content/api-docs", + routeBasePath: "api", + docItemComponent: "@theme/ApiItem", + lastVersion: "current", + includeCurrentVersion: true, + admonitions: { + keywords: ["preview", "further"], + extendDefaults: true }, - { - tagName: "script", - attributes: { - type: "text/javascript", - "data-usercentrics": "Google Tag Manager", - src: "/scripts/googleTagManager.js", - }, + versions: { + current: { + label: "latest" + } }, - ], - stylesheets: [], - presets: [ - [ - "classic", - /** @type {import('@docusaurus/preset-classic').Options} */ - { - docs: { - path: "docs/docs-content", - showLastUpdateAuthor: false, - showLastUpdateTime: true, - routeBasePath: "/", - lastVersion: "current", - includeCurrentVersion: true, - versions: { - current: { - label: "latest", - }, - }, - admonitions: { - keywords: ["preview", "further"], - extendDefaults: true, - }, - // exclude: ["api/v1/palette-apis-3-4"], - - sidebarPath: require.resolve("./sidebars.js"), - async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) { - const { docs } = args; - const filteredDocs = docs.filter((doc) => { - return true; - }); - const sidebarItems = await defaultSidebarItemsGenerator({ - ...args, - docs: filteredDocs, - }); - return sidebarItems; - }, - editUrl: "https://github.com/spectrocloud/librarium/blob/master", - }, - sitemap: { - changefreq: "daily", - priority: 0.5, - ignorePatterns: ["/tags/**"], - filename: "sitemap.xml", - }, - theme: { - customCss: require.resolve("./src/css/custom.scss"), - }, - }, - ], - ], - plugins: [ - "docusaurus-plugin-sass", - [ - "@docusaurus/plugin-content-docs", - { - id: "api", - path: "docs/api-content/api-docs", - routeBasePath: "api", - docItemComponent: "@theme/ApiItem", - lastVersion: "current", - includeCurrentVersion: true, - admonitions: { - keywords: ["preview", "further"], - extendDefaults: true, + sidebarPath: require.resolve("./apisidebar.js") + }], ["docusaurus-plugin-openapi-docs", { + // Visit https://docusaurus-openapi.tryingpan.dev/#config to learn more about this plugin's config options. + id: "apidocs", + docsPluginId: "api", + config: { + palette: { + specPath: "docs/api-content/api-docs/v1/api.json", + outputDir: "docs/api-content/api-docs/v1", + downloadUrl: "https://github.com/spectrocloud/librarium/blob/master/docs/api-content/api-docs/palette-apis.json", + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag" }, - versions: { - current: { - label: "latest", - }, - }, - sidebarPath: require.resolve("./apisidebar.js"), - }, - ], - [ - "docusaurus-plugin-openapi-docs", - { - // Visit https://docusaurus-openapi.tryingpan.dev/#config to learn more about this plugin's config options. - id: "apidocs", - docsPluginId: "api", - config: { - palette: { - specPath: "docs/api-content/api-docs/v1/api.json", - outputDir: "docs/api-content/api-docs/v1", - downloadUrl: - "https://github.com/spectrocloud/librarium/blob/master/docs/api-content/api-docs/palette-apis.json", - sidebarOptions: { - groupPathsBy: "tag", - categoryLinkSource: "tag", - }, - template: "api.mustache", - // Customize API MDX with mustache template - hideSendButton: true, - }, - }, - }, - ], - process.env.NODE_ENV !== "production" && [ - () => ({ - name: "plugin-enable-source-map", - configureWebpack() { - return { - devtool: "source-map", - }; - }, - }), - { - id: "enable-source-map", - }, - ], - [ - pluginPacksAndIntegrationsData, - { - repositories: ["Palette Registry", "Public Repo", "Spectro Addon Repo", "Palette Community Registry"], - }, - ], - pluginImportFontAwesomeIcons, - function () { + template: "api.mustache", + // Customize API MDX with mustache template + hideSendButton: true + } + } + }], process.env.NODE_ENV !== "production" && [() => ({ + name: "plugin-enable-source-map", + configureWebpack() { return { - name: "plugin-watch-custom-plugin-path", - getPathsToWatch() { - return ["plugins/font-awesome.js", "plugins/packs-integrations.js"]; - }, + devtool: "source-map" }; - }, - [ - "@docusaurus/plugin-ideal-image", - { - quality: 50, - max: 1035, - steps: 4, - disableInDev: false, - }, - ], - [ - require.resolve("docusaurus-plugin-image-zoom"), - { - id: "docusaurus-plugin-image-zoom", - }, - ], - [ - "@docusaurus/plugin-client-redirects", - { - redirects: [...redirects], - }, - ], - ].filter(Boolean), - scripts: [ - { - src: `https://w.appzi.io/w.js?token=${process.env.APPZI_TOKEN}`, - defer: true, - }, - ], + } + }), { + id: "enable-source-map" + }], [pluginPacksAndIntegrationsData, { + repositories: ["Palette Registry", "Public Repo", "Spectro Addon Repo", "Palette Community Registry"] + }], pluginImportFontAwesomeIcons, function () { + return { + name: "plugin-watch-custom-plugin-path", + getPathsToWatch() { + return ["plugins/font-awesome.js", "plugins/packs-integrations.js"]; + } + }; + }, ["@docusaurus/plugin-ideal-image", { + quality: 50, + max: 1035, + steps: 4, + disableInDev: false + }], [require.resolve("docusaurus-plugin-image-zoom"), { + id: "docusaurus-plugin-image-zoom" + }], ["@docusaurus/plugin-client-redirects", { + redirects: [...redirects] + }]].filter(Boolean), + scripts: [{ + src: `https://w.appzi.io/w.js?token=${process.env.APPZI_TOKEN}`, + defer: true + }], themes: ["docusaurus-theme-openapi-docs"], customFields: { // Put your custom environment here }, - themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - { - // announcementBar: { - // id: "docs_announcement_bar", - // content: - // REPLACE MESSAGE BELOW - // 'The 2024 State of Production Kubernetes report is now available and it\'s full of insights and goodies. Click here to get your own copy.', - // backgroundColor: "#FBB117", - // textColor: "#091E42", - // isCloseable: false, - // }, - colorMode: { - respectPrefersColorScheme: true, - }, - docs: { - sidebar: { - hideable: false, - autoCollapseCategories: true, - }, - }, - tableOfContents: { - minHeadingLevel: 2, - maxHeadingLevel: 3, - }, - // Replace with your project's social card - image: "img/spectro-cloud-social-card.png", - navbar: { - title: "", - logo: { - href: "/", - target: "self", - width: 144, - height: 36, - alt: "Spectro cloud logo", - src: "img/spectrocloud-logo-light.svg", - srcDark: "img/spectrocloud-logo-dark.svg", - }, - items: [ - { - to: "/", - type: "docSidebar", - sidebarId: "docSidebar", - label: "Docs", - position: "left", - activeBaseRegex: "^(?!/api/).*$", - }, - { - to: "/tutorials", - type: "docSidebar", - sidebarId: "tutorialSidebar", - label: "Tutorials", - position: "left", - activeBaseRegex: "^(?!/api/).*$", - }, - { - to: "/api/introduction", - label: "API", - position: "left", - }, - { - href: "https://github.com/spectrocloud/librarium", - position: "right", - className: "header-github-link", - "aria-label": "GitHub repository", - }, - { - type: "docsVersionDropdown", - position: "left", - docsPluginId: "default", - }, - { - type: "docsVersionDropdown", - position: "left", - docsPluginId: "api", - }, - ], - hideOnScroll: true, - }, - languageTabs: [ - { - highlight: "bash", - language: "curl", - logoClass: "bash", - }, - { - highlight: "python", - language: "python", - logoClass: "python", - variant: "requests", - }, - { - highlight: "go", - language: "go", - logoClass: "go", - }, - { - highlight: "javascript", - language: "nodejs", - logoClass: "nodejs", - variant: "axios", - }, - { - highlight: "java", - language: "java", - logoClass: "java", - variant: "unirest", - }, - ], - algolia: { - // The application ID provided by Algolia - appId: process.env.ALGOLIA_APP_ID, - // Public API key: it is safe to commit it - apiKey: process.env.ALGOLIA_SEARCH_KEY, - indexName: process.env.ALGOLIA_INDEX_NAME, - // Optional: see doc section below - contextualSearch: true, - // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. - externalUrlRegex: "external\\.com|domain\\.com", - // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs - replaceSearchResultPathname: { - from: "/docs/", - // or as RegExp: /\/docs\// - to: "/", - }, - // Optional: Algolia search parameters - searchParameters: {}, - // Optional: path for search page that enabled by default (`false` to disable it) - searchPagePath: "search", - maxResultsPerGroup: 7, - }, + themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + { + // announcementBar: { + // id: "docs_announcement_bar", + // content: + // REPLACE MESSAGE BELOW + // 'The 2024 State of Production Kubernetes report is now available and it\'s full of insights and goodies. Click here to get your own copy.', + // backgroundColor: "#FBB117", + // textColor: "#091E42", + // isCloseable: false, + // }, + colorMode: { + respectPrefersColorScheme: true + }, + docs: { sidebar: { - hideable: true, - }, - prism: { - defaultLanguage: "json", - theme: lightCodeTheme, - darkTheme: darkCodeTheme, - additionalLanguages: ["hcl", "bash", "json", "powershell", "go", "javascript", "rust"], - magicComments: [ - { - className: "theme-code-block-highlighted-line", - line: "highlight-next-line", - block: { - start: "highlight-start", - end: "highlight-end", - }, - }, - { - className: "code-block-error-line", - line: "This will error", - }, - ], + hideable: false, + autoCollapseCategories: true + } + }, + tableOfContents: { + minHeadingLevel: 2, + maxHeadingLevel: 3 + }, + // Replace with your project's social card + image: "img/spectro-cloud-social-card.png", + navbar: { + title: "", + logo: { + href: "/", + target: "self", + width: 144, + height: 36, + alt: "Spectro cloud logo", + src: "img/spectrocloud-logo-light.svg", + srcDark: "img/spectrocloud-logo-dark.svg" }, - zoom: { - selector: ".markdown-image", - background: { - light: "rgb(255, 255, 255)", - dark: "rgb(50, 50, 50)", - }, - config: {}, + items: [{ + to: "/", + type: "docSidebar", + sidebarId: "docSidebar", + label: "Docs", + position: "left", + activeBaseRegex: "^(?!/api/).*$" + }, { + to: "/tutorials", + type: "docSidebar", + sidebarId: "tutorialSidebar", + label: "Tutorials", + position: "left", + activeBaseRegex: "^(?!/api/).*$" + }, { + to: "/api/introduction", + label: "API", + position: "left" + }, { + href: "https://github.com/spectrocloud/librarium", + position: "right", + className: "header-github-link", + "aria-label": "GitHub repository" + }, { + type: "docsVersionDropdown", + position: "left", + docsPluginId: "default" + }, { + type: "docsVersionDropdown", + position: "left", + docsPluginId: "api" + }], + hideOnScroll: true + }, + languageTabs: [{ + highlight: "bash", + language: "curl", + logoClass: "bash" + }, { + highlight: "python", + language: "python", + logoClass: "python", + variant: "requests" + }, { + highlight: "go", + language: "go", + logoClass: "go" + }, { + highlight: "javascript", + language: "nodejs", + logoClass: "nodejs", + variant: "axios" + }, { + highlight: "java", + language: "java", + logoClass: "java", + variant: "unirest" + }], + algolia: { + // The application ID provided by Algolia + appId: process.env.ALGOLIA_APP_ID, + // Public API key: it is safe to commit it + apiKey: process.env.ALGOLIA_SEARCH_KEY, + indexName: process.env.ALGOLIA_INDEX_NAME, + // Optional: see doc section below + contextualSearch: true, + // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. + externalUrlRegex: "external\\.com|domain\\.com", + // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs + replaceSearchResultPathname: { + from: "/docs/", + // or as RegExp: /\/docs\// + to: "/" }, + // Optional: Algolia search parameters + searchParameters: {}, + // Optional: path for search page that enabled by default (`false` to disable it) + searchPagePath: "search", + maxResultsPerGroup: 7 + }, + sidebar: { + hideable: true }, + prism: { + defaultLanguage: "json", + theme: lightCodeTheme, + darkTheme: darkCodeTheme, + additionalLanguages: ["hcl", "bash", "json", "powershell", "go", "javascript", "rust"], + magicComments: [{ + className: "theme-code-block-highlighted-line", + line: "highlight-next-line", + block: { + start: "highlight-start", + end: "highlight-end" + } + }, { + className: "code-block-error-line", + line: "This will error" + }] + }, + zoom: { + selector: ".markdown-image", + background: { + light: "rgb(255, 255, 255)", + dark: "rgb(50, 50, 50)" + }, + config: {} + } + } }; module.exports = config; export default function (context, options) { @@ -411,6 +356,6 @@ export default function (context, options) { getPathsToWatch() { const contentPath = path.resolve(context.siteDir, options.path); return [`${contentPath}/_partials/*/*.{mdx}`]; - }, + } }; -} +} \ No newline at end of file