Skip to main content
Ctrl+K

PyData Theme

  • User Guide
  • Contributor Guide
  • Examples
  • Changelog
    • API
    • PyData Website
    • NumFocus
    • Donate to NumFocus
  • X
  • GitHub
  • PyPI
  • PyData
  • User Guide
  • Contributor Guide
  • Examples
  • Changelog
  • API
  • PyData Website
  • NumFocus
  • Donate to NumFocus
  • X
  • GitHub
  • PyPI
  • PyData

Section Navigation

Contributor guide

  • Get started with development
  • Structure of this theme
  • Topic guides
    • Accessibility checks and manual auditing
    • Web assets (CSS/JS/Fonts)
    • Ignore formatting commits with git blame
    • Upgrade to bootstrap 5
    • Update Sphinx configuration during the build
    • Update JavaScript dependencies and their versions
    • Galleries and the gallery-grid directive
    • Internationalization
    • Update our kitchen sink
    • Set up a manual development environment
    • Page-level configuration
    • Using pre-commit
    • PyData package support
    • Expected build warnings

Team practices

  • Merge and review policy
  • Making releases
  • Supported Python and Sphinx versions

About the project

  • Contributors to this theme
  • Inspiration for design and UX
  • PyData Sphinx Theme Design System
  • Accessibility Statement for Pydata Sphinx Theme Draft
  • Contributor Guide
  • Topic guides
  • Galleries and the gallery-grid directive

Galleries and the gallery-grid directive#

There are a few places where we use sphinx-design to generate “galleries” of grids with structured text and images. We’ve created a little Sphinx directive to make it easier to repeat this process in our documentation and to avoid repeating ourselves too much. It is located in the docs/scripts/ folder in a dedicated module, and re-used throughout our documentation.

The example gallery#

This theme’s documentation contains a gallery of sites that use this theme for their documentation. The images are automatically generated during ReadTheDocs builds, but are not automatically generated on local or test builds (to save time).

If you build the documentation locally without first generating these images you may get Sphinx warnings or errors, but this should be fine as long as the images build on ReadTheDocs tests.

Download gallery images locally#

If you’d like to build these images locally to preview in the theme, follow these steps:

  1. Install playwright and the Chromium browser add-on:

    $ pip install playwright
    $ playwright install chromium
    
  2. Execute the gallery generation script from the repository root:

    $ python ./docs/scripts/generate_gallery_images.py
    

Note

The newly generated images will be pushed to the distant repository.

previous

Update JavaScript dependencies and their versions

next

Internationalization

On this page
  • The example gallery
    • Download gallery images locally
Edit on GitHub
Show Source

© Copyright 2019, PyData Community.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.2dev0.