File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1616 const siteConfig = require ( `${ CWD } /siteConfig.js` ) ;
1717 const versions = require ( `${ CWD } /versions.json` ) ;
1818
19+ const versionToReleaseTags = {
20+ '5.x' : '5.0.0' ,
21+ '6.x' : '6.0.0' ,
22+ '7.x' : '7.0.0-beta.0'
23+ }
24+
1925 function Versions ( ) {
2026 const latestVersion = versions [ 0 ] ;
2127 const repoUrl = `https://github.com/${ siteConfig . organizationName } /${
2228 siteConfig . projectName
2329 } `;
24- const releaseTagUrl = version => `${ repoUrl } /releases/tag/v${ version } `
30+ const releaseTagUrl = version => versionToReleaseTags . hasOwnProperty ( version ) ? ` ${ repoUrl } /releases/tag/v ${ versionToReleaseTags [ version ] } ` : `${ repoUrl } /releases/tag/v${ version } `
2531 return (
2632 < div className = "docMainWrapper wrapper" >
2733 < Container className = "mainContainer versionsContainer" >
4854 This is the version that is configured automatically when you first
4955 install this project.
5056 </ p >
51- { /* uncomment here if we have pre-release notes
52- <h3 id="rc">Pre-release versions</h3>
57+ {
58+ ! ! siteConfig . nextVersion && ( < React . Fragment >
59+ < h3 id = "rc" > Pre-release versions</ h3 >
5360 < table className = "versions" >
5461 < tbody >
5562 < tr >
6269 </ td >
6370 </ tr >
6471 </ tbody >
65- </table> */ }
72+ </ table >
73+ </ React . Fragment > )
74+ }
6675 < h3 id = "archive" > Past Versions</ h3 >
6776 < table className = "versions" >
6877 < tbody >
6978 { versions . map (
7079 version =>
7180 version !== latestVersion && (
72- < tr >
81+ < tr key = { `version- ${ version } ` } >
7382 < th > { version } </ th >
7483 < td >
7584 < a href = { `${ version } /introduction/quick-start` } > Documentation</ a >
Original file line number Diff line number Diff line change @@ -98,7 +98,14 @@ const siteConfig = {
9898 // template. For example, if you need your repo's URL...
9999 repoUrl : "https://github.com/reduxjs/react-redux" ,
100100
101- // nextVersion: "6.0.0",
101+ /**
102+ * Note:
103+ * This will generate a link on the versioned docs page for "pre-release versions"
104+ * Once next version is released, run "yarn run version 7.x", and docusaurus will add 7.x to stable version
105+ * After that, 7.x will no longer appear in "pre-release" versions and we should remove this line
106+ * More info: https://docusaurus.io/docs/en/versioning
107+ */
108+ nextVersion : "7.x" ,
102109
103110 gaTrackingId : "UA-130598673-2" ,
104111} ;
You can’t perform that action at this time.
0 commit comments