Skip to content

Commit

Permalink
chore: external Version URL (#1693)
Browse files Browse the repository at this point in the history
* save

* chore: added missing section for version API

* chore: fixed label
  • Loading branch information
karl-cardenas-coding committed Oct 22, 2023
1 parent e11218c commit 73ce7d3
Show file tree
Hide file tree
Showing 4 changed files with 81,333 additions and 3 deletions.
3 changes: 3 additions & 0 deletions archiveVersions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"3.4.x and prior": "https://version-3-4.legacy.docs.spectrocloud.com"
}
81,312 changes: 81,311 additions & 1 deletion docs/api-content/api-docs/v1/api.json

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require("dotenv").config();
const lightCodeTheme = require("prism-react-renderer/themes/oceanicNext");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const redirects = require("./redirects");
const ArchivedVersions = require('./archiveVersions.json');
const {
pluginPacksAndIntegrationsData
} = require("./plugins/packs-integrations");
Expand Down Expand Up @@ -284,12 +285,28 @@ const config = {
{
type: "docsVersionDropdown",
position: "left",
docsPluginId: "default"
docsPluginId: "default",
dropdownItemsAfter: [
...Object.entries(ArchivedVersions).map(
([versionName, versionUrl]) => ({
href: versionUrl,
label: versionName,
})
),
],
},
{
type: "docsVersionDropdown",
position: "left",
docsPluginId: "api",
dropdownItemsAfter: [
...Object.entries(ArchivedVersions).map(
([versionName, versionUrl]) => ({
href: versionUrl,
label: versionName,
})
),
],
},
],
hideOnScroll: true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi
echo "Temp directory: $tempdir"
echo "Base directory: $baseDir"
# List of version branches to exclude
exclude_branches=() # DO NOT ADD A COMMA BETWEEN THE BRANCHES. ADD A SPACE INSTEAD AND THE NEW VERSION STRING.
exclude_branches=(version-3-4) # DO NOT ADD A COMMA BETWEEN THE BRANCHES. ADD A SPACE INSTEAD AND THE NEW VERSION STRING.
# exclude_branches=("version-3-4")

# Save the current branch name
Expand Down

0 comments on commit 73ce7d3

Please sign in to comment.