Skip to content

Commit

Permalink
Merge pull request #494 from kevin-lee/update-docs
Browse files Browse the repository at this point in the history
Update docs - move the archived versions to `versionsArchived.json`
  • Loading branch information
kevin-lee authored Oct 1, 2023
2 parents d72db32 + b5942af commit 1b0ee86
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 190 deletions.
195 changes: 5 additions & 190 deletions website/src/pages/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,203 +15,18 @@ import {
useLatestVersion,
} from '@docusaurus/plugin-content-docs/client';

import VersionsArchived from './versionsArchived.json';

function Version() {
const {siteConfig} = useDocusaurusContext();
const versions = useVersions();
const latestVersion = useLatestVersion();
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")) {
Expand Down
Loading

0 comments on commit 1b0ee86

Please sign in to comment.