Fix docUrl and pageUrl in the Footer & image path (#1514)

* Fix docUrl and pageUrl in the Footer

* Fix katex-comparison.gif path

* Fix typo in the url to `supported`
This commit is contained in:
ylemkimon
2018-07-30 02:40:10 +09:00
committed by Erik Demaine
parent edede0867d
commit cd80db5ded
2 changed files with 6 additions and 4 deletions

View File

@@ -10,12 +10,14 @@ const React = require('react');
class Footer extends React.Component {
docUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
return baseUrl + 'docs/' + (language && language !== 'en'
? language + '/' : '') + doc;
}
pageUrl(doc, language) {
const baseUrl = this.props.config.baseUrl;
return baseUrl + (language ? language + '/' : '') + doc;
return baseUrl + (language && language !== 'en'
? language + '/' : '') + doc;
}
render() {
@@ -43,7 +45,7 @@ class Footer extends React.Component {
<a href={this.docUrl('options.html', this.props.language)}>
Configuration
</a>
<a href={this.docUrl('support.html', this.props.language)}>
<a href={this.docUrl('supported.html', this.props.language)}>
Misc
</a>
</div>