mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 01:02:35 +02:00
fix(v2): use frontmatter title at first for paginated links (#4859)
This commit is contained in:
parent
08b94580e9
commit
0417ab9532
4 changed files with 12 additions and 6 deletions
|
@ -199,7 +199,11 @@ export default function pluginContentDocs(
|
|||
nextId,
|
||||
} = sidebarsUtils.getDocNavigation(doc.id);
|
||||
const toDocNavLink = (navDocId: string): DocNavLink => ({
|
||||
title: docsBaseById[navDocId].title,
|
||||
// Use frontMatter.title in priority over a potential # title found in markdown
|
||||
// See https://github.com/facebook/docusaurus/issues/4665#issuecomment-825831367
|
||||
title:
|
||||
docsBaseById[navDocId].frontMatter.title ||
|
||||
docsBaseById[navDocId].title,
|
||||
permalink: docsBaseById[navDocId].permalink,
|
||||
});
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue