mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 13:38:33 +02:00
fix algolia version to use the correct version info, not 'current' (#797)
This commit is contained in:
parent
c5661b0e1e
commit
9ff5328c88
1 changed files with 3 additions and 5 deletions
|
@ -33,13 +33,11 @@ class Site extends React.Component {
|
|||
this.props.config.url +
|
||||
this.props.config.baseUrl +
|
||||
(this.props.url || 'index.html');
|
||||
let docsVersion = this.props.version || 'current';
|
||||
let docsVersion = this.props.version;
|
||||
|
||||
if (fs.existsSync(CWD + '/versions.json')) {
|
||||
if (!docsVersion && fs.existsSync(CWD + '/versions.json')) {
|
||||
const latestVersion = require(CWD + '/versions.json')[0];
|
||||
if (docsVersion === latestVersion) {
|
||||
docsVersion = 'current';
|
||||
}
|
||||
docsVersion = latestVersion;
|
||||
}
|
||||
|
||||
// We do not want a lang attribute for the html tag if we don't have a language set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue