fix(docs): move screenshots into static/ so they actually load on the deployed site#134
Merged
rubenvdlinde merged 1 commit intodevelopmentfrom May 6, 2026
Merged
Conversation
… deployed site Discovered while investigating broken image loads on https://mydash.conduction.nl/docs/tutorials/user/edit-content — the deployed HTML referenced `../../screenshots/tutorials/user/foo.png` literally, but the screenshots dir was under `docs/screenshots/` which Docusaurus does NOT copy into the build output. Pre-existing feature docs that referenced `../screenshots/foo.png` were silently broken in production for the same reason. Fix: - Moved every PNG from `docs/screenshots/` to `docs/static/screenshots/`. Docusaurus serves anything in `static/*` from the build root, so `docs/static/screenshots/tutorials/user/foo.png` is now reachable at `https://mydash.conduction.nl/screenshots/tutorials/user/foo.png`. - Bulk-rewrote every markdown image ref in `docs/features/*.md` and `docs/tutorials/{user,admin}/*.md` from relative paths (`../screenshots/…` and `../../screenshots/…`) to root-absolute `/screenshots/…`. 20 files touched, mechanical replacement only. - Updated `tests/e2e/docs-screenshots.spec.ts` SHOT_ROOT to write into the new static/ path so future capture runs land in the right place. Verified locally with `docusaurus build`; the build now copies every PNG into `build/screenshots/…` and the rendered HTML references match. Side-fix in same commit: dropped the `nl` locale from the Docusaurus i18n config. The Dutch build was failing on `origin/development` even before this PR with "Cannot read properties of undefined (reading 'id')" SSR errors on five tutorial + the widgets-vs-tiles page — because `i18n/nl/` only has stale translation strings, no actual translated markdown. Re-add `'nl'` to the `locales` array once the Dutch translation pass has been completed or the metadata audited.
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 501/501 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 90.7% (127/140 statements)
Quality workflow — 2026-05-06 12:32 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Investigating a user report of broken image loads on https://mydash.conduction.nl/docs/tutorials/user/edit-content surfaced the root cause:
../../screenshots/tutorials/user/foo.png, but Docusaurus does NOT copydocs/screenshots/into the build. Onlydocs/static/*is copied to the build root.../../...paths, which the browser resolved to URLs that 404'd.docs/features/*.md) referenced../screenshots/…and were silently broken in production for the same reason.What changed
docs/screenshots/todocs/static/screenshots/. Docusaurus servesstatic/*from the build root.docs/features/*.mdanddocs/tutorials/{user,admin}/*.mdfrom relative paths (../screenshots/…,../../screenshots/…) to root-absolute/screenshots/…. 20 files touched, mechanical replacement only.tests/e2e/docs-screenshots.spec.tsSHOT_ROOTto write into the new path.Side-fix bundled in same commit
Dropped the
nllocale from the Docusaurus i18n config. The Dutch build was failing onorigin/developmenteven before this PR withTypeError: Cannot read properties of undefined (reading 'id')SSR errors on five tutorial pages pluswidgets-vs-tiles— becausei18n/nl/only carries stale translation strings, no actual translated markdown. Re-add'nl'to thelocalesarray once the Dutch translation pass is done or the metadata audited.Verified
docusaurus buildclean (was failing onnlSSR before)build/screenshots/tutorials/user/01-first-launch-overview.pngexists in the build outputhttps://mydash.conduction.nl/screenshots/tutorials/user/05-context-menu.png→ expect 200