Skip to content

Commit

Permalink
fix algolia version to use the correct version info, not 'current' (#797
Browse files Browse the repository at this point in the history
)
  • Loading branch information
endiliey committed Jun 23, 2018
1 parent c5661b0 commit 9ff5328
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ff5328

Please sign in to comment.