mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-17 08:37:57 +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
|
@ -27,9 +27,9 @@ class Head extends React.Component {
|
|||
}/styles/${highlight.theme}.min.css`;
|
||||
|
||||
// ensure the siteUrl variable ends with a single slash
|
||||
const siteUrl =
|
||||
(this.props.config.url + this.props.config.baseUrl).replace(/\/+$/, '') +
|
||||
'/';
|
||||
const siteUrl = `${(
|
||||
this.props.config.url + this.props.config.baseUrl
|
||||
).replace(/\/+$/, '')}/`;
|
||||
|
||||
return (
|
||||
<head>
|
||||
|
@ -64,7 +64,7 @@ class Head extends React.Component {
|
|||
)}
|
||||
{this.props.config.noIndex && <meta name="robots" content="noindex" />}
|
||||
{this.props.redirect && (
|
||||
<meta httpEquiv="refresh" content={'0; URL=' + this.props.redirect} />
|
||||
<meta httpEquiv="refresh" content={`0; URL=${this.props.redirect}`} />
|
||||
)}
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
|
@ -81,16 +81,16 @@ class Head extends React.Component {
|
|||
<link
|
||||
rel="alternate"
|
||||
type="application/atom+xml"
|
||||
href={siteUrl + 'blog/atom.xml'}
|
||||
title={this.props.config.title + ' Blog ATOM Feed'}
|
||||
href={`${siteUrl}blog/atom.xml`}
|
||||
title={`${this.props.config.title} Blog ATOM Feed`}
|
||||
/>
|
||||
)}
|
||||
{hasBlog && (
|
||||
<link
|
||||
rel="alternate"
|
||||
type="application/rss+xml"
|
||||
href={siteUrl + 'blog/feed.xml'}
|
||||
title={this.props.config.title + ' Blog RSS Feed'}
|
||||
href={`${siteUrl}blog/feed.xml`}
|
||||
title={`${this.props.config.title} Blog RSS Feed`}
|
||||
/>
|
||||
)}
|
||||
{this.props.config.gaTrackingId &&
|
||||
|
@ -167,13 +167,13 @@ class Head extends React.Component {
|
|||
{this.props.config.usePrism && (
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href={this.props.config.baseUrl + 'css/prism.css'}
|
||||
href={`${this.props.config.baseUrl}css/prism.css`}
|
||||
/>
|
||||
)}
|
||||
{/* Site defined code. Keep these at the end to avoid overriding. */}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href={this.props.config.baseUrl + 'css/main.css'}
|
||||
href={`${this.props.config.baseUrl}css/main.css`}
|
||||
/>
|
||||
</head>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue