mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
misc: show only latest archive alpha/beta versions dropdown (#5862)
This commit is contained in:
parent
91ec2509b7
commit
9f13f8f7af
1 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,10 @@ const versions = require('./versions.json');
|
||||||
const math = require('remark-math');
|
const math = require('remark-math');
|
||||||
const katex = require('rehype-katex');
|
const katex = require('rehype-katex');
|
||||||
const VersionsArchived = require('./versionsArchived.json');
|
const VersionsArchived = require('./versionsArchived.json');
|
||||||
|
const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice(
|
||||||
|
0,
|
||||||
|
5,
|
||||||
|
);
|
||||||
const {dogfoodingPluginInstances} = require('./_dogfooding/dogfooding.config');
|
const {dogfoodingPluginInstances} = require('./_dogfooding/dogfooding.config');
|
||||||
|
|
||||||
// This probably only makes sense for the beta phase, temporary
|
// This probably only makes sense for the beta phase, temporary
|
||||||
|
@ -364,7 +368,7 @@ const config = {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
dropdownActiveClassDisabled: true,
|
dropdownActiveClassDisabled: true,
|
||||||
dropdownItemsAfter: [
|
dropdownItemsAfter: [
|
||||||
...Object.entries(VersionsArchived).map(
|
...ArchivedVersionsDropdownItems.map(
|
||||||
([versionName, versionUrl]) => ({
|
([versionName, versionUrl]) => ({
|
||||||
label: versionName,
|
label: versionName,
|
||||||
href: versionUrl,
|
href: versionUrl,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue