Skip to content

Choosing the thumbnail figures in tutorials - #826

Merged
seisman merged 1 commit into
masterfrom
thumbnail
Jan 31, 2021
Merged

seisman merged 1 commit into
masterfrom
thumbnail

Conversation

@seisman

@seisman seisman commented Jan 31, 2021 •

Copy link
Copy Markdown
Member

Description of proposed changes

  • Add comments # sphinx_gallery_thumbnail_number = X to tutorials and choose the best thumbnail images.
  • Mention # sphinx_gallery_thumbnail_number = X in the contributing guide

Fixes #819.

Before: https://www.pygmt.org/dev/api/generated/pygmt.Figure.colorbar.html
image

After: https://pygmt-g8hz11nur.vercel.app
image

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Notes

  • You can write /format in the first line of a comment to lint the code automatically

@seisman seisman added the documentation Improvements or additions to documentation label Jan 31, 2021
@seisman seisman added this to the 0.3.0 milestone Jan 31, 2021
@seisman
seisman requested review from a team January 31, 2021 03:06

@weiji14 weiji14 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pity that there's no setting to just choose the last thumbnail by default 🙂

@seisman

seisman commented Jan 31, 2021

Copy link
Copy Markdown
Member Author

Pity that there's no setting to just choose the last thumbnail by default 🙂

I thought # sphinx_gallery_thumbnail_number = -1 may work but it doesn't. Sounds a good feature request for sphinx-gallery, right?

@seisman
seisman merged commit 55ade6f into master Jan 31, 2021
@seisman
seisman deleted the thumbnail branch January 31, 2021 04:06
@weiji14

weiji14 commented Jan 31, 2021

Copy link
Copy Markdown
Member

Yeah, I see you've submitted it upstream at sphinx-gallery/sphinx-gallery#785.

@seisman seisman mentioned this pull request Feb 4, 2021
2 of 5 tasks
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Description of proposed changes

- Add comments # sphinx_gallery_thumbnail_number = X to tutorials and choose the best thumbnail images.
- Mention # sphinx_gallery_thumbnail_number = X in the contributing guide

This branch was previously deployed

1 inactive deployment
Preview — 9336a09e Deployed Jan 31, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Choose the best thumbnail image for tutorials

2 participants