Screenshots for reusable modal dialogs docs, plus just shots (#2958)

docs/shots.yml defines documentation screenshots for shot-scraper

"Just shots" runs them.
This commit is contained in:
Simon Willison 2026-09-24 15:06:57 -07:00 • committed by GitHub
commit cec5e6b2ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 157 additions and 41 deletions

View file

@ -312,6 +312,19 @@ To update these pages, run the following command::
uv run cog -r docs/*.rst
.. _contributing_documentation_screenshots:
Documentation screenshots
~~~~~~~~~~~~~~~~~~~~~~~~~
Screenshots in the documentation are defined in ``docs/shots.yml`` and taken using `shot-scraper <https://shot-scraper.datasette.io/>`__. That file starts a Datasette server that loads JavaScript from ``docs/shots/``, then saves each screenshot as a WebP image in ``docs/images/``.
To take any screenshots that do not exist yet, run::
just shots
``just docs`` runs this too. Existing images are skipped. To replace a screenshot, delete its image file and run ``just shots`` again.
.. _contributing_template_contexts:
Documented template contexts