feat(images): add sync_upstream_images script for image synchronization#1815
feat(images): add sync_upstream_images script for image synchronization#1815debs-obrien wants to merge 8 commits intomicrosoft:mainfrom
Conversation
mxschmitt
left a comment
There was a problem hiding this comment.
There is already src/generate.js which does the chokidar watching. Ideally we can just have a function there which copies all the images over if its !watchMode and if its watchMode it reflects the changes in the directory. Then we dont have to repeat ourselves. Inside the md files we can use it like this:
<img src={require('@site/static/docs/playwright-logo.svg').default} />
see: https://docusaurus.io/docs/static-assets
and we should put the images in this folder in the microsoft/playwright repo (where we sync from): docs/src/images
and in the microsoft/playwright.dev repo we want to have it inside: static/docs/
There was a problem hiding this comment.
Pull Request Overview
This PR adds image synchronization functionality to automatically sync image files from the upstream Playwright repository to the documentation site. The feature includes both initial sync and watch-based synchronization for real-time updates during development.
- Adds comprehensive image file handling with copy, remove, and recursive sync operations
- Implements file system watching for automatic image updates during development
- Integrates image synchronization into the existing documentation generation workflow
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…te paths in generated documentation
|
Looks not relevant anymore after #1818. |
Automatically syncs images from the upstream Playwright repo to the docs site and converts image paths during build.
Eliminates manual work - no more uploading and copying images by hand
Keeps images in sync - automatically pulls latest screenshots from upstream
Fixes VS Code preview - uses relative paths in source, absolute paths in generated docs
The script watches for image changes and ensures documentation always has the latest visuals without manual intervention.