Skip to content

Commit a5a09e9

Browse files
jeremymanningclaude
andcommitted
Add custom gallery thumbnail configuration for animated examples
- Configure sphinx-gallery to use custom thumbnails for animations - Add thumbnail override configuration for 6 animated examples - Enable proper thumbnail generation for interactive and special examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cc15167 commit a5a09e9

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/conf.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,16 @@
239239
'scipy': 'https://docs.scipy.org/doc/scipy/reference/',
240240
'pandas': 'https://pandas.pydata.org/pandas-docs/stable/',
241241
'scikit-learn': 'https://scikit-learn.org/stable/',
242-
}}
242+
},
243+
# Use custom thumbnails for animated examples
244+
'thumbnail_number': -1, # Use last generated image as thumbnail
245+
'image_scrapers': ('matplotlib',),
246+
# Override thumbnails with custom GIFs for animated examples
247+
'thumbnails': {
248+
'../examples/chemtrails.py': 'images/thumb/sphx_glr_chemtrails_thumb.gif',
249+
'../examples/animate_MDS.py': 'images/thumb/sphx_glr_animate_MDS_thumb.gif',
250+
'../examples/animate_spin.py': 'images/thumb/sphx_glr_animate_spin_thumb.gif',
251+
'../examples/animate.py': 'images/thumb/sphx_glr_animate_thumb.gif',
252+
'../examples/precog.py': 'images/thumb/sphx_glr_precog_thumb.gif',
253+
'../examples/save_movie.py': 'images/thumb/sphx_glr_save_movie_thumb.gif',
254+
}

0 commit comments

Comments
 (0)