mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
fix(v1): fix broken links in example docs (#2453)
* fix(v1): add languages file to fix broken links * fix(v1): add languages file to fix broken links * fix(v1): change links for default website instead of introducing languages file * fix(v1): after linter run * fix(v1): fix my IDE's weird formatting * fix(v1): follow same indentation as the rest of the anchor tags * fix(v1): maybe I do need linter to run
This commit is contained in:
parent
ecfb55eee8
commit
bf3c7cc8f9
1 changed files with 6 additions and 16 deletions
|
@ -8,17 +8,11 @@
|
|||
const React = require('react');
|
||||
|
||||
class Footer extends React.Component {
|
||||
docUrl(doc, language) {
|
||||
docUrl(doc) {
|
||||
const baseUrl = this.props.config.baseUrl;
|
||||
const docsUrl = this.props.config.docsUrl;
|
||||
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
|
||||
const langPart = `${language ? `${language}/` : ''}`;
|
||||
return `${baseUrl}${docsPart}${langPart}${doc}`;
|
||||
}
|
||||
|
||||
pageUrl(doc, language) {
|
||||
const baseUrl = this.props.config.baseUrl;
|
||||
return baseUrl + (language ? `${language}/` : '') + doc;
|
||||
return `${baseUrl}${docsPart}${doc}`;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -37,21 +31,17 @@ class Footer extends React.Component {
|
|||
</a>
|
||||
<div>
|
||||
<h5>Docs</h5>
|
||||
<a href={this.docUrl('doc1.html', this.props.language)}>
|
||||
<a href={this.docUrl('doc1.html')}>
|
||||
Getting Started (or other categories)
|
||||
</a>
|
||||
<a href={this.docUrl('doc2.html', this.props.language)}>
|
||||
Guides (or other categories)
|
||||
</a>
|
||||
<a href={this.docUrl('doc3.html', this.props.language)}>
|
||||
<a href={this.docUrl('doc2.html')}>Guides (or other categories)</a>
|
||||
<a href={this.docUrl('doc3.html')}>
|
||||
API Reference (or other categories)
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>Community</h5>
|
||||
<a href={this.pageUrl('users.html', this.props.language)}>
|
||||
User Showcase
|
||||
</a>
|
||||
<a href={`${this.props.config.baseUrl}users`}>User Showcase</a>
|
||||
<a
|
||||
href="https://stackoverflow.com/questions/tagged/"
|
||||
target="_blank"
|
||||
|
|
Loading…
Add table
Reference in a new issue