From b5942af309b80054fa514325aab70dfe02ca11f2 Mon Sep 17 00:00:00 2001 From: Kevin Lee Date: Sun, 1 Oct 2023 23:41:40 +1100 Subject: [PATCH] Update docs - move the archived versions to versionsArchived.json [skip ci] --- website/src/pages/versions.js | 195 +----------------------- website/src/pages/versionsArchived.json | 190 +++++++++++++++++++++++ 2 files changed, 195 insertions(+), 190 deletions(-) create mode 100644 website/src/pages/versionsArchived.json diff --git a/website/src/pages/versions.js b/website/src/pages/versions.js index 9bb399b..a22f7df 100644 --- a/website/src/pages/versions.js +++ b/website/src/pages/versions.js @@ -15,6 +15,8 @@ import { useLatestVersion, } from '@docusaurus/plugin-content-docs/client'; +import VersionsArchived from './versionsArchived.json'; + function Version() { const {siteConfig} = useDocusaurusContext(); const versions = useVersions(); @@ -22,196 +24,9 @@ function Version() { const currentVersion = versions.find((version) => version.name === 'current'); const pastVersions = versions.filter( (version) => version !== latestVersion && version.name !== 'current', - ).concat([ - { - "name": "2.0.0-beta20", - "label": "2.0.0-beta20", - }, - { - "name": "2.0.0-beta19", - "label": "2.0.0-beta19", - }, - { - "name": "2.0.0-beta18", - "label": "2.0.0-beta18", - }, - { - "name": "2.0.0-beta17", - "label": "2.0.0-beta17", - }, - { - "name": "2.0.0-beta16", - "label": "2.0.0-beta16", - }, - { - "name": "2.0.0-beta15", - "label": "2.0.0-beta15", - }, - { - "name": "2.0.0-beta14", - "label": "2.0.0-beta14", - }, - { - "name": "2.0.0-beta13", - "label": "2.0.0-beta13", - }, - { - "name": "2.0.0-beta12", - "label": "2.0.0-beta12", - }, - { - "name": "2.0.0-beta11", - "label": "2.0.0-beta11", - }, - { - "name": "2.0.0-beta10", - "label": "2.0.0-beta10", - }, - { - "name": "2.0.0-beta9", - "label": "2.0.0-beta9", - }, - { - "name": "2.0.0-beta8", - "label": "2.0.0-beta8", - }, - { - "name": "2.0.0-beta7", - "label": "2.0.0-beta7", - }, - { - "name": "2.0.0-beta6", - "label": "2.0.0-beta6", - }, - { - "name": "2.0.0-beta5", - "label": "2.0.0-beta5", - }, - { - "name": "2.0.0-beta4", - "label": "2.0.0-beta4", - }, - { - "name": "2.0.0-beta3", - "label": "2.0.0-beta3", - }, - { - "name": "2.0.0-beta2", - "label": "2.0.0-beta2", - }, - { - "name": "2.0.0-beta1", - "label": "2.0.0-beta1", - }, - { - "name": "1.20.0", - "label": "1.20.0", - }, - { - "name": "1.19.0", - "label": "1.19.0", - }, - { - "name": "1.18.0", - "label": "1.18.0", - }, - { - "name": "1.17.0", - "label": "1.17.0", - }, - { - "name": "1.16.0", - "label": "1.16.0", - }, - { - "name": "1.15.0", - "label": "1.15.0", - }, - { - "name": "1.14.0", - "label": "1.14.0", - }, - { - "name": "1.13.0", - "label": "1.13.0", - }, - { - "name": "1.12.0", - "label": "1.12.0", - }, - { - "name": "1.11.0", - "label": "1.11.0", - }, - { - "name": "1.10.0", - "label": "1.10.0", - }, - { - "name": "1.9.0", - "label": "1.9.0", - }, - { - "name": "1.8.0", - "label": "1.8.0", - }, - { - "name": "1.7.0", - "label": "1.7.0", - }, - { - "name": "1.6.0", - "label": "1.6.0", - }, - { - "name": "1.5.0", - "label": "1.5.0", - }, - { - "name": "1.4.0", - "label": "1.4.0", - }, - { - "name": "1.3.1", - "label": "1.3.1", - }, - { - "name": "1.3.0", - "label": "1.3.0", - }, - { - "name": "1.2.0", - "label": "1.2.0", - }, - { - "name": "1.1.0", - "label": "1.1.0", - }, - { - "name": "1.0.0", - "label": "1.0.0", - }, - { - "name": "0.4.0", - "label": "0.4.0", - }, - { - "name": "0.3.1", - "label": "0.3.1", - }, - { - "name": "0.3.0", - "label": "0.3.0", - }, - { - "name": "0.2.0", - "label": "0.2.0", - }, - { - "name": "0.1.0", - "label": "0.1.0", - }, - ]).sort((a, b) => { + ) + .concat(VersionsArchived) + .sort((a, b) => { // console.log(`a: ${JSON.stringify(a)}, b: ${JSON.stringify(b)}`); if (!a.name.includes(".") || !b.name.includes(".")) { if (a.name.includes("v")) { diff --git a/website/src/pages/versionsArchived.json b/website/src/pages/versionsArchived.json new file mode 100644 index 0000000..545b241 --- /dev/null +++ b/website/src/pages/versionsArchived.json @@ -0,0 +1,190 @@ +[ + { + "name": "2.0.0-beta20", + "label": "2.0.0-beta20" + }, + { + "name": "2.0.0-beta19", + "label": "2.0.0-beta19" + }, + { + "name": "2.0.0-beta18", + "label": "2.0.0-beta18" + }, + { + "name": "2.0.0-beta17", + "label": "2.0.0-beta17" + }, + { + "name": "2.0.0-beta16", + "label": "2.0.0-beta16" + }, + { + "name": "2.0.0-beta15", + "label": "2.0.0-beta15" + }, + { + "name": "2.0.0-beta14", + "label": "2.0.0-beta14" + }, + { + "name": "2.0.0-beta13", + "label": "2.0.0-beta13" + }, + { + "name": "2.0.0-beta12", + "label": "2.0.0-beta12" + }, + { + "name": "2.0.0-beta11", + "label": "2.0.0-beta11" + }, + { + "name": "2.0.0-beta10", + "label": "2.0.0-beta10" + }, + { + "name": "2.0.0-beta9", + "label": "2.0.0-beta9" + }, + { + "name": "2.0.0-beta8", + "label": "2.0.0-beta8" + }, + { + "name": "2.0.0-beta7", + "label": "2.0.0-beta7" + }, + { + "name": "2.0.0-beta6", + "label": "2.0.0-beta6" + }, + { + "name": "2.0.0-beta5", + "label": "2.0.0-beta5" + }, + { + "name": "2.0.0-beta4", + "label": "2.0.0-beta4" + }, + { + "name": "2.0.0-beta3", + "label": "2.0.0-beta3" + }, + { + "name": "2.0.0-beta2", + "label": "2.0.0-beta2" + }, + { + "name": "2.0.0-beta1", + "label": "2.0.0-beta1" + }, + { + "name": "1.20.0", + "label": "1.20.0" + }, + { + "name": "1.19.0", + "label": "1.19.0" + }, + { + "name": "1.18.0", + "label": "1.18.0" + }, + { + "name": "1.17.0", + "label": "1.17.0" + }, + { + "name": "1.16.0", + "label": "1.16.0" + }, + { + "name": "1.15.0", + "label": "1.15.0" + }, + { + "name": "1.14.0", + "label": "1.14.0" + }, + { + "name": "1.13.0", + "label": "1.13.0" + }, + { + "name": "1.12.0", + "label": "1.12.0" + }, + { + "name": "1.11.0", + "label": "1.11.0" + }, + { + "name": "1.10.0", + "label": "1.10.0" + }, + { + "name": "1.9.0", + "label": "1.9.0" + }, + { + "name": "1.8.0", + "label": "1.8.0" + }, + { + "name": "1.7.0", + "label": "1.7.0" + }, + { + "name": "1.6.0", + "label": "1.6.0" + }, + { + "name": "1.5.0", + "label": "1.5.0" + }, + { + "name": "1.4.0", + "label": "1.4.0" + }, + { + "name": "1.3.1", + "label": "1.3.1" + }, + { + "name": "1.3.0", + "label": "1.3.0" + }, + { + "name": "1.2.0", + "label": "1.2.0" + }, + { + "name": "1.1.0", + "label": "1.1.0" + }, + { + "name": "1.0.0", + "label": "1.0.0" + }, + { + "name": "0.4.0", + "label": "0.4.0" + }, + { + "name": "0.3.1", + "label": "0.3.1" + }, + { + "name": "0.3.0", + "label": "0.3.0" + }, + { + "name": "0.2.0", + "label": "0.2.0" + }, + { + "name": "0.1.0", + "label": "0.1.0" + } +] \ No newline at end of file