2019-06-05 18:46:00 +04:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
const React = require('react');
|
|
|
|
|
|
|
|
const CompLibrary = require('../../core/CompLibrary');
|
|
|
|
|
|
|
|
const Container = CompLibrary.Container;
|
|
|
|
|
|
|
|
const CWD = process.cwd();
|
|
|
|
|
|
|
|
const versions = require(`${CWD}/versions.json`);
|
|
|
|
|
|
|
|
function Versions(props) {
|
|
|
|
const {config: siteConfig} = props;
|
|
|
|
const latestVersion = versions[0];
|
2019-09-20 17:27:20 +04:00
|
|
|
const repoUrl = `${siteConfig.repoUrl}`;
|
2019-06-05 18:46:00 +04:00
|
|
|
return (
|
|
|
|
<div className="docMainWrapper wrapper">
|
|
|
|
<Container className="mainContainer versionsContainer">
|
|
|
|
<div className="post">
|
|
|
|
<header className="postHeader">
|
2019-09-20 17:27:20 +04:00
|
|
|
<h1>{siteConfig.title} Versions </h1>
|
2019-06-05 18:46:00 +04:00
|
|
|
</header>
|
2019-06-10 22:15:14 +04:00
|
|
|
<h3 id="latest">Current version</h3>
|
2019-06-05 18:46:00 +04:00
|
|
|
<table className="versions">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>{latestVersion}</th>
|
|
|
|
<td>
|
|
|
|
{/* You are supposed to change this href where appropriate
|
|
|
|
Example: href="<baseUrl>/docs(/:language)/:id" */}
|
|
|
|
<a
|
|
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
|
|
props.language ? props.language + '/' : ''
|
2019-11-09 18:40:53 +04:00
|
|
|
}intro/installation`}>
|
2019-06-05 18:46:00 +04:00
|
|
|
Documentation
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href={repoUrl}>Source Code</a>
|
|
|
|
</td>
|
|
|
|
{/* <td>
|
|
|
|
<a href="">Release Notes</a>
|
|
|
|
</td> */}
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<h3 id="rc">Pre-release versions</h3>
|
|
|
|
<table className="versions">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>next</th>
|
|
|
|
<td>
|
|
|
|
{/* You are supposed to change this href where appropriate
|
|
|
|
Example: href="<baseUrl>/docs(/:language)/next/:id" */}
|
|
|
|
<a
|
|
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
|
|
props.language ? props.language + '/' : ''
|
2019-11-09 18:40:53 +04:00
|
|
|
}next/intro/installation`}>
|
2019-06-05 18:46:00 +04:00
|
|
|
Documentation
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href={repoUrl}>Source Code</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<h3 id="archive">Past Versions</h3>
|
|
|
|
<p>Here you can find previous versions of the documentation.</p>
|
|
|
|
<table className="versions">
|
|
|
|
<tbody>
|
|
|
|
{versions.map(
|
|
|
|
version =>
|
2019-06-06 17:45:45 +04:00
|
|
|
version !== latestVersion && version !== "next" && (
|
2019-06-05 18:46:00 +04:00
|
|
|
<tr>
|
|
|
|
<th>{version}</th>
|
|
|
|
<td>
|
|
|
|
{/* You are supposed to change this href where appropriate
|
|
|
|
Example: href="<baseUrl>/docs(/:language)/:version/:id" */}
|
|
|
|
<a
|
|
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
|
|
props.language ? props.language + '/' : ''
|
2019-11-09 18:40:53 +04:00
|
|
|
}${version}/intro/installation`}>
|
2019-06-05 18:46:00 +04:00
|
|
|
Documentation
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href={`${repoUrl}/releases/tag/v${version}`}>
|
|
|
|
Release Notes
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
),
|
|
|
|
)}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<p>
|
|
|
|
You can find past versions of this project on{' '}
|
2020-01-22 19:16:08 +04:00
|
|
|
<a href={repoUrl}>GitLab</a>.
|
2019-06-05 18:46:00 +04:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Versions;
|