-
Notifications
You must be signed in to change notification settings - Fork 97
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.8 (Dev)', path: 'v1.8', }, "v1.7": { label: 'v1.7 (Latest)', path: 'v1.7', banner: `none` }, } -
Remove the earliest EOL version from the
versionslist. We only display the latest EOL version to minimize memory usage during the build process.Note: Docusaurus recommends maintaining fewer than 10 versions.
-
-
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.7": { specPath: "api/v1.7-swagger.json", outputDir: "versioned_docs/version-v1.7/api", // No trailing slash label: "v1.7", baseUrl: "/v1.7/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.