Skip to content

Commit 5f9c80e

Browse files
authored
Use link title for footer links and page cards (#3849)
1 parent 9c69cc4 commit 5f9c80e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

packages/gitbook/src/components/PageBody/PageBodyBlankslate.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function PageBodyBlankslate(props: {
4646
<Card
4747
key={child.id}
4848
leadingIcon={icon}
49-
title={child.title}
49+
title={child.linkTitle || child.title}
5050
href={resolved.href}
5151
insights={{
5252
type: 'link_click',
@@ -62,7 +62,14 @@ export async function PageBodyBlankslate(props: {
6262
pages: context.revision.pages,
6363
page: child,
6464
});
65-
return <Card key={child.id} title={child.title} leadingIcon={icon} href={href} />;
65+
return (
66+
<Card
67+
key={child.id}
68+
title={child.linkTitle || child.title}
69+
leadingIcon={icon}
70+
href={href}
71+
/>
72+
);
6673
})
6774
);
6875

packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function PageFooterNavigation(props: {
4343
<NavigationCard
4444
icon="chevron-left"
4545
label={t(language, 'previous_page')}
46-
title={previous.title}
46+
title={previous.linkTitle || previous.title}
4747
href={previousHref}
4848
insights={{
4949
type: 'link_click',
@@ -62,7 +62,7 @@ export async function PageFooterNavigation(props: {
6262
<NavigationCard
6363
icon="chevron-right"
6464
label={t(language, 'next_page')}
65-
title={next.title}
65+
title={next.linkTitle || next.title}
6666
href={nextHref}
6767
insights={{
6868
type: 'link_click',

0 commit comments

Comments
 (0)