mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
Add previous and next titles to metadata props
This commit is contained in:
parent
429ffda351
commit
7b2e950a4c
2 changed files with 14 additions and 3 deletions
|
@ -17,7 +17,7 @@ class DocsLayout extends React.Component {
|
|||
render() {
|
||||
const metadata = this.props.metadata;
|
||||
const content = this.props.children;
|
||||
const i18n = translation[this.props.metadata.language];
|
||||
const i18n = false; //translation[this.props.metadata.language];
|
||||
let DocComponent = Doc;
|
||||
if (this.props.Doc) {
|
||||
DocComponent = this.props.Doc;
|
||||
|
@ -68,7 +68,7 @@ class DocsLayout extends React.Component {
|
|||
"localized-strings"
|
||||
]["previous"] ||
|
||||
"Previous"
|
||||
: metadata[metadata.previous_id].title || "Previous"
|
||||
: metadata.previous_title || "Previous"
|
||||
}
|
||||
</a>
|
||||
)}
|
||||
|
@ -84,7 +84,7 @@ class DocsLayout extends React.Component {
|
|||
"localized-strings"
|
||||
]["next"] ||
|
||||
"Next"
|
||||
: metadata[metadata.next_id].title || "Next"
|
||||
: metadata.next_title || "Next"
|
||||
}{" "}
|
||||
→
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue