File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/gitbook/src/components/TableOfContents Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { ToggleableLinkItem } from './ToggleableLinkItem';
1010
1111export function PageDocumentItem ( props : { page : ClientTOCPageDocument } ) {
1212 const { page } = props ;
13+ const title = page . sidebarTitle || page . title ;
1314
1415 return (
1516 < li className = "flex flex-col" >
@@ -41,10 +42,10 @@ export function PageDocumentItem(props: { page: ClientTOCPageDocument }) {
4142 { page . emoji || page . icon ? (
4243 < span className = "flex items-center gap-3" >
4344 < TOCPageIcon page = { page } />
44- { page . title }
45+ { title }
4546 </ span >
4647 ) : (
47- page . title
48+ title
4849 ) }
4950 </ ToggleableLinkItem >
5051 </ li >
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export type ClientTOCPageDocument = {
1919 type : 'document' ;
2020 id : string ;
2121 title : string ;
22+ sidebarTitle ?: string ;
2223 href : string ;
2324 emoji ?: string ;
2425 icon ?: string ;
@@ -73,6 +74,7 @@ export async function encodeClientTableOfContents(
7374 removeUndefined ( {
7475 id : page . id ,
7576 title : page . title ,
77+ sidebarTitle : page . sidebarTitle ,
7678 href,
7779 emoji : page . emoji ,
7880 icon : page . icon ,
You can’t perform that action at this time.
0 commit comments