Skip to content

docs: Replace the social preview image and the sidebar logo - #250

Merged
ShisatoYano merged 1 commit into
mainfrom
docs/new-social-preview-and-logo
Nov 21, 2026
Merged

ShisatoYano merged 1 commit into
mainfrom
docs/new-social-preview-and-logo

Conversation

@ShisatoYano

Copy link
Copy Markdown
Owner

What this changes

  • Replaces the social preview image (social_preview.png, 1280x640) and the logo at the top left of the web book's sidebar (logo.png, 540x220) with new designs
  • Both images are now committed in doc/_extra/ instead of being drawn by matplotlib at build time. .gitignore now ignores only banner.png, which is still drawn from the demos
  • doc/social_preview.py only draws the front page's banner now, so it is renamed to doc/banner.py and the functions that drew the preview and the logo are removed
  • Sets logo_only: True in the theme options, since the new logo already shows the title and the theme would repeat it as text above the logo

The published URL of the preview image (/social_preview.png, used by og:image) is unchanged. The repository's social preview in Settings has already been updated to the same image.

How I checked it works

  • sphinx-build -W --keep-going -b html doc doc/_build/html builds without warnings
  • The built social_preview.png and _static/logo.png are byte-identical to the new images, and og:image still points to /social_preview.png
  • Checked the built front page in headless Chrome at 1400 px and 400 px wide: the logo's background color is the same as the sidebar header's (#2980B9), the title is no longer shown twice, and the mobile layout is unchanged
  • Cropped the preview image by 80 px at the top and bottom (as GitHub's repository cards can show it): the title, subtitle, all tags and the figure stay inside

🤖 Generated with Claude Code

The new designs are made outside the book build, so they are committed
as images instead of being drawn by matplotlib at build time. Only the
front page's banner is still drawn from the demos, so the script is
renamed to banner.py. The logo already shows the title, so the theme's
title text above it is turned off with logo_only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ShisatoYano ShisatoYano added the documentation Improvements or additions to documentation label Nov 21, 2026
@ShisatoYano ShisatoYano self-assigned this Nov 21, 2026
@ShisatoYano
ShisatoYano merged commit 4c9e4da into main Nov 21, 2026
7 checks passed
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.

1 participant