File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,8 @@ def from_section(
308308 kwargs [f"h{ i + 1 } " ] = heading
309309 if tutorial .images :
310310 # TODO consider an explicitly set thumbnail from tutorial metadata
311- kwargs ["thumbnail_url" ] = tutorial .images [0 ]
311+ # kwargs["thumbnail_url"] = tutorial.images[0] # with JupyterBook, this selects the sidebar logo
312+ kwargs ["thumbnail_url" ] = tutorial .images [- 1 ]
312313
313314 return cls (** kwargs )
314315
@@ -352,7 +353,8 @@ def from_section(
352353 if page .image_urls :
353354 # TODO consider getting a thumbnail explicitly set form guide
354355 # metadata
355- thumbnail_url : Optional [str ] = page .image_urls [0 ]
356+ # thumbnail_url: Optional[str] = page.image_urls[0]
357+ thumbnail_url : Optional [str ] = page .image_urls [- 1 ]
356358 elif site_metadata .logo_url :
357359 thumbnail_url = site_metadata .logo_url
358360 else :
You can’t perform that action at this time.
0 commit comments