mirror of
https://github.com/prometheus/docs.git
synced 2026-02-05 15:45:27 +01:00
Merge pull request #2660 from prometheus/more-navtitle-usage
Also use `navTitle` over `title` in prev/next buttons and breadcrumbs
This commit is contained in:
@@ -41,7 +41,7 @@ export default function PrevNextEditButtons({
|
||||
whiteSpace: "normal",
|
||||
}}
|
||||
>
|
||||
{currentPage.prev.title}
|
||||
{currentPage.prev.navTitle ?? currentPage.prev.title}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Button>
|
||||
@@ -100,7 +100,7 @@ export default function PrevNextEditButtons({
|
||||
whiteSpace: "normal",
|
||||
}}
|
||||
>
|
||||
{currentPage.next.title}
|
||||
{currentPage.next.navTitle ?? currentPage.next.title}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Button>
|
||||
|
||||
@@ -58,7 +58,7 @@ function resolveRelativeUrl(currentPath: string, relativeUrl: string): string {
|
||||
function pagefindBreadcrumbsTitle(currentPage: DocMetadata) {
|
||||
const titles: string[] = [];
|
||||
for (let node = currentPage; node; node = node.parent!) {
|
||||
titles.unshift(node.title);
|
||||
titles.unshift(node.navTitle ?? node.title);
|
||||
}
|
||||
return titles.join(" > ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user