mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Generates a file that redirects from /docs/file.html to /docs/en/folder.html when languages are enabled (languages.js is present) (#137)
This commit is contained in:
parent
bcba05ae03
commit
967970eaa5
3 changed files with 104 additions and 5 deletions
|
@ -18,7 +18,7 @@ class Head extends React.Component {
|
|||
let sourceCodeButton = this.props.config.sourceCodeButton;
|
||||
// defaults to github, but other values may be allowed in the future
|
||||
let includeGithubButton =
|
||||
sourceCodeButton === 'github' || sourceCodeButton == null;
|
||||
sourceCodeButton === "github" || sourceCodeButton == null;
|
||||
return (
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
|
@ -36,6 +36,12 @@ class Head extends React.Component {
|
|||
content={this.props.config.baseUrl + this.props.config.ogImage}
|
||||
/>
|
||||
)}
|
||||
{this.props.redirect && (
|
||||
<meta
|
||||
http-equiv="refresh"
|
||||
content={"2; URL=" + this.props.redirect}
|
||||
/>
|
||||
)}
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href={this.props.config.baseUrl + this.props.config.favicon}
|
||||
|
@ -66,10 +72,13 @@ class Head extends React.Component {
|
|||
title={this.props.config.title + " Blog RSS Feed"}
|
||||
/>
|
||||
)}
|
||||
{includeGithubButton &&
|
||||
{includeGithubButton && (
|
||||
<script async defer src="https://buttons.github.io/buttons.js" />
|
||||
}
|
||||
<script type="text/javascript" src={this.props.config.baseUrl + "js/webplayer.js"} />
|
||||
)}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src={this.props.config.baseUrl + "js/webplayer.js"}
|
||||
/>
|
||||
<script type="text/javascript" src="https://snack.expo.io/embed.js" />
|
||||
</head>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue