File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
packages/gitbook/src/components Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " gitbook " : patch
3+ ---
4+
5+ Fix PDF generation when user has dark mode configured.
Original file line number Diff line number Diff line change @@ -12,14 +12,15 @@ export function Tabs(props: BlockProps<DocumentBlockTabs>) {
1212 const tabs : TabsItem [ ] = [ ] ;
1313 const tabsBody : React . ReactNode [ ] = [ ] ;
1414
15- block . nodes . forEach ( ( tab ) => {
15+ block . nodes . forEach ( ( tab , index ) => {
1616 tabs . push ( {
1717 id : tab . meta ?. id ?? tab . key ! ,
1818 title : tab . data . title ?? '' ,
1919 } ) ;
2020
2121 tabsBody . push (
2222 < Blocks
23+ key = { tab . key ?? index }
2324 nodes = { tab . nodes }
2425 document = { document }
2526 ancestorBlocks = { [ ...ancestorBlocks , block , tab ] }
Original file line number Diff line number Diff line change 11import { CustomizationRootLayout } from '@/components/RootLayout' ;
22import { defaultCustomization } from '@/lib/utils' ;
3+ import { CustomizationThemeMode } from '@gitbook/api' ;
34import type { GitBookSiteContext , GitBookSpaceContext } from '@v2/lib/context' ;
45
56/**
@@ -16,6 +17,7 @@ export async function PDFRootLayout(props: {
1617 customization = {
1718 'customization' in context ? context . customization : defaultCustomization ( )
1819 }
20+ forcedTheme = { CustomizationThemeMode . Light }
1921 >
2022 { children }
2123 </ CustomizationRootLayout >
You can’t perform that action at this time.
0 commit comments