mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-12 06:18:02 +02:00
feat: use 'sidebar_label' instead of 'title' in prev/next buttons (#1122)
* feat: use 'sidebar_label' instead of 'title' in prev/next buttons * docs: update 'sidebar_label' description
This commit is contained in:
parent
a3ff990471
commit
2df14feafd
2 changed files with 13 additions and 1 deletions
|
@ -60,11 +60,23 @@ class DocsLayout extends React.Component {
|
|||
const hasOnPageNav = this.props.config.onPageNav === 'separate';
|
||||
|
||||
const previousTitle =
|
||||
idx(i18n, [
|
||||
'localized-strings',
|
||||
'docs',
|
||||
metadata.previous_id,
|
||||
'sidebar_label',
|
||||
]) ||
|
||||
idx(i18n, ['localized-strings', 'docs', metadata.previous_id, 'title']) ||
|
||||
idx(i18n, ['localized-strings', 'previous']) ||
|
||||
metadata.previous_title ||
|
||||
'Previous';
|
||||
const nextTitle =
|
||||
idx(i18n, [
|
||||
'localized-strings',
|
||||
'docs',
|
||||
metadata.next_id,
|
||||
'sidebar_label',
|
||||
]) ||
|
||||
idx(i18n, ['localized-strings', 'docs', metadata.next_id, 'title']) ||
|
||||
idx(i18n, ['localized-strings', 'next']) ||
|
||||
metadata.next_title ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue