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 && (
|
||||
<meta
|
||||
http-equiv="refresh"
|
||||
content={"2; URL=" + this.props.redirect}
|
||||
content={"0; URL=" + this.props.redirect}
|
||||
/>
|
||||
)}
|
||||
<link
|
||||
|
|
|
@ -45,17 +45,11 @@ class Redirect extends React.Component {
|
|||
redirect={redirect}
|
||||
/>
|
||||
<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
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
<!--
|
||||
window.setTimeout(
|
||||
function(){window.location.href = "${this.props
|
||||
.redirect}"},3000
|
||||
);
|
||||
window.location.href = "${this.props.redirect}";
|
||||
// -->
|
||||
`
|
||||
}}
|
||||
|
|
|
@ -202,7 +202,7 @@ function execute() {
|
|||
metadata={metadata}
|
||||
language={language}
|
||||
config={siteConfig}
|
||||
redirect={"/" + siteConfig.baseUrl + metadata.permalink}
|
||||
redirect={siteConfig.baseUrl + metadata.permalink}
|
||||
/>
|
||||
);
|
||||
const redirectStr = renderToStaticMarkup(redirectComp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue