mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Removed copy from redirect page, reduced delay to 0s for js and meta
This commit is contained in:
parent
57251a22c0
commit
a9571ebf4d
3 changed files with 3 additions and 9 deletions
|
@ -40,7 +40,7 @@ class Head extends React.Component {
|
||||||
{this.props.redirect && (
|
{this.props.redirect && (
|
||||||
<meta
|
<meta
|
||||||
http-equiv="refresh"
|
http-equiv="refresh"
|
||||||
content={"2; URL=" + this.props.redirect}
|
content={"0; URL=" + this.props.redirect}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<link
|
<link
|
||||||
|
|
|
@ -45,17 +45,11 @@ class Redirect extends React.Component {
|
||||||
redirect={redirect}
|
redirect={redirect}
|
||||||
/>
|
/>
|
||||||
<body className={this.props.className}>
|
<body className={this.props.className}>
|
||||||
The page you are looking for has moved. If you are not redirected to
|
|
||||||
the new page in three seconds, then you can navigate to the new page
|
|
||||||
by using <a href={this.props.redirect}>this link</a>.
|
|
||||||
<script
|
<script
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
<!--
|
<!--
|
||||||
window.setTimeout(
|
window.location.href = "${this.props.redirect}";
|
||||||
function(){window.location.href = "${this.props
|
|
||||||
.redirect}"},3000
|
|
||||||
);
|
|
||||||
// -->
|
// -->
|
||||||
`
|
`
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -202,7 +202,7 @@ function execute() {
|
||||||
metadata={metadata}
|
metadata={metadata}
|
||||||
language={language}
|
language={language}
|
||||||
config={siteConfig}
|
config={siteConfig}
|
||||||
redirect={"/" + siteConfig.baseUrl + metadata.permalink}
|
redirect={siteConfig.baseUrl + metadata.permalink}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const redirectStr = renderToStaticMarkup(redirectComp);
|
const redirectStr = renderToStaticMarkup(redirectComp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue