mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-28 01:59:15 +00:00
Reduce version redundancy (#4707)
This commit is contained in:
parent
fbd4332bee
commit
521a2bd3cf
1 changed files with 24 additions and 24 deletions
|
@ -2,6 +2,27 @@ import * as path from 'path';
|
||||||
import type * as Preset from '@docusaurus/preset-classic';
|
import type * as Preset from '@docusaurus/preset-classic';
|
||||||
import type { Config } from '@docusaurus/types';
|
import type { Config } from '@docusaurus/types';
|
||||||
import { themes } from 'prism-react-renderer';
|
import { themes } from 'prism-react-renderer';
|
||||||
|
import * as versions from './versions.json';
|
||||||
|
|
||||||
|
const docsVersions = {
|
||||||
|
current: {
|
||||||
|
label: 'Next 🚧',
|
||||||
|
banner: 'unreleased',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const includeVersions = ['current', versions.default[0]];
|
||||||
|
|
||||||
|
versions.default.forEach((v, index) => {
|
||||||
|
const version = {
|
||||||
|
label: `${v}.x${index === 0 ? '' : ' 💀'}`,
|
||||||
|
};
|
||||||
|
if (index !== 0 && process.env.NODE_ENV !== 'development') {
|
||||||
|
version['banner'] = 'unmaintained';
|
||||||
|
includeVersions.push(v);
|
||||||
|
}
|
||||||
|
docsVersions[v] = version;
|
||||||
|
});
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
title: 'Woodpecker CI',
|
title: 'Woodpecker CI',
|
||||||
|
@ -236,30 +257,9 @@ const config = {
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
sidebarPath: require.resolve('./sidebars.js'),
|
||||||
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/',
|
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/',
|
||||||
includeCurrentVersion: true,
|
includeCurrentVersion: true,
|
||||||
lastVersion: '2.8',
|
lastVersion: versions.default[0],
|
||||||
onlyIncludeVersions:
|
onlyIncludeVersions: includeVersions,
|
||||||
process.env.NODE_ENV === 'development' ? ['current', '2.8'] : ['current', '2.8', '2.7', '2.6', '1.0'],
|
versions: docsVersions,
|
||||||
versions: {
|
|
||||||
current: {
|
|
||||||
label: 'Next 🚧',
|
|
||||||
banner: 'unreleased',
|
|
||||||
},
|
|
||||||
'2.8': {
|
|
||||||
label: '2.8.x',
|
|
||||||
},
|
|
||||||
'2.7': {
|
|
||||||
label: '2.7.x 💀',
|
|
||||||
banner: 'unmaintained',
|
|
||||||
},
|
|
||||||
'2.6': {
|
|
||||||
label: '2.6.x 💀',
|
|
||||||
banner: 'unmaintained',
|
|
||||||
},
|
|
||||||
'1.0': {
|
|
||||||
label: '1.0.x 💀',
|
|
||||||
banner: 'unmaintained',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
blog: {
|
blog: {
|
||||||
blogTitle: 'Blog',
|
blogTitle: 'Blog',
|
||||||
|
|
Loading…
Reference in a new issue