mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 04:12:53 +02:00
ESLintify Part 3 (#846)
* ESLintify Part 3 * ESLintify Part 3 * ESLintify Part 3
This commit is contained in:
parent
5ac2cee658
commit
a7a214fb3a
54 changed files with 435 additions and 497 deletions
|
@ -11,7 +11,7 @@ const fs = require('fs');
|
|||
const HeaderNav = require('./nav/HeaderNav.js');
|
||||
const Head = require('./Head.js');
|
||||
|
||||
const Footer = require(process.cwd() + '/core/Footer.js');
|
||||
const Footer = require(`${process.cwd()}/core/Footer.js`);
|
||||
const translation = require('../server/translation.js');
|
||||
const constants = require('./constants');
|
||||
|
||||
|
@ -24,9 +24,9 @@ class Site extends React.Component {
|
|||
? translation[this.props.language]['localized-strings'].tagline
|
||||
: this.props.config.tagline;
|
||||
const title = this.props.title
|
||||
? this.props.title + ' · ' + this.props.config.title
|
||||
? `${this.props.title} · ${this.props.config.title}`
|
||||
: (!this.props.config.disableTitleTagline &&
|
||||
this.props.config.title + ' · ' + tagline) ||
|
||||
`${this.props.config.title} · ${tagline}`) ||
|
||||
this.props.config.title;
|
||||
const description = this.props.description || tagline;
|
||||
const url =
|
||||
|
@ -35,8 +35,8 @@ class Site extends React.Component {
|
|||
(this.props.url || 'index.html');
|
||||
let docsVersion = this.props.version;
|
||||
|
||||
if (!docsVersion && fs.existsSync(CWD + '/versions.json')) {
|
||||
const latestVersion = require(CWD + '/versions.json')[0];
|
||||
if (!docsVersion && fs.existsSync(`${CWD}/versions.json`)) {
|
||||
const latestVersion = require(`${CWD}/versions.json`)[0];
|
||||
docsVersion = latestVersion;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue