-
Notifications
You must be signed in to change notification settings - Fork 94
Publish a New Doc Version
-
Create a subfolder in
versioned_docs. Follow the existing subfolder naming convention (version-v1.x). -
Copy and paste the contents of
docsinto the subfolder. -
Duplicate the most recent
sidebars.jsonfile inversioned_sidebars. Rename the file using the existing convention (version-v1.x-sidebars.json). -
Update the
presetssection of thedocusaurus.config.jsfile.-
Update the
lastVersionvalue. -
Under
versions, update the values forcurrentand 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` }, }
-
-
Duplicate the
dev-swagger.jsonfile inAPI. Rename the file using the existing convention (v1.x-swagger.json). -
If necessary, update the
version-v1.x-sidebars.jsonfile. You may need to manually add and remove API doc IDs flagged as missing during the build process. -
Update the
docusaurus-plugin-openapi-docssection of thedocusaurus.config.jsfile.-
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 },
-
-
versions.jsonfile: Add the latest doc version. -
index.jsfile in thesrcfolder (path:src>pages>index.js): Update the doc version in the redirect rule.Example:
return <Redirect to={${context.config.baseUrl}v1.4} />; -
README.mdfile: Update the File Location section.