Skip to content

Publish a New Doc Version

Jillian edited this page Dec 17, 2024 · 1 revision

Main Documentation

  1. Create a subfolder in versioned_docs. Follow the existing subfolder naming convention (version-v1.x).

  2. Copy and paste the contents of docs into the subfolder.

  3. Duplicate the most recent sidebars.json file in versioned_sidebars. Rename the file using the existing convention (version-v1.x-sidebars.json).

  4. Update the presets section of the docusaurus.config.js file.

    • Update the lastVersion value.

    • Under versions, update the values for current and add fields for the latest release.

      Ensure that the latest release is marked (latest) and the version under development is marked (dev).

      Example:

      versions: {
        current: {
          label: 'v1.5 (dev)',
          path: 'v1.5',
        },
        "v1.4": {
          label: 'v1.4 (latest)',
          path: 'v1.4',
          banner: `none`
        },
      }
      

API Documentation

  1. Duplicate the dev-swagger.json file in API. Rename the file using the existing convention (v1.x-swagger.json).

  2. If necessary, update the version-v1.x-sidebars.json file. You may need to manually add and remove API doc IDs flagged as missing during the build process.

  3. Update the docusaurus-plugin-openapi-docs section of the docusaurus.config.js file.

    • Under versions, add fields for the latest release. Ensure that the values contain the correct doc version.

      Example:

      "v1.4": {
        specPath: "api/v1.4-swagger.json",
        outputDir: "versioned_docs/version-v1.4/api", // No trailing slash
        label: "v1.4",
        baseUrl: "/v1.4/api", // Leading slash is important
      },       
      

Other Files

  • versions.json file: Add the latest doc version.

  • index.js file in the src folder (path: src > pages > index.js): Update the doc version in the redirect rule.

    Example: return <Redirect to={${context.config.baseUrl}v1.4} />;

  • README.md file: Update the File Location section.

Clone this wiki locally