Skip to content

fix(docs): move screenshots into static/ so they actually load on the deployed site#134

Merged
rubenvdlinde merged 1 commit intodevelopmentfrom
feature/fix-screenshot-paths
May 6, 2026
Merged

fix(docs): move screenshots into static/ so they actually load on the deployed site#134
rubenvdlinde merged 1 commit intodevelopmentfrom
feature/fix-screenshot-paths

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Investigating a user report of broken image loads on https://mydash.conduction.nl/docs/tutorials/user/edit-content surfaced the root cause:

  • Tutorial markdown referenced ../../screenshots/tutorials/user/foo.png, but Docusaurus does NOT copy docs/screenshots/ into the build. Only docs/static/* is copied to the build root.
  • The deployed HTML carried the literal ../../... paths, which the browser resolved to URLs that 404'd.
  • Pre-existing feature pages (docs/features/*.md) referenced ../screenshots/… and were silently broken in production for the same reason.

What changed

  • Moved every screenshot from docs/screenshots/ to docs/static/screenshots/. Docusaurus serves static/* from the build root.
  • Bulk-rewrote every markdown image ref in docs/features/*.md and docs/tutorials/{user,admin}/*.md from relative paths (../screenshots/…, ../../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 path.

Side-fix bundled 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 TypeError: Cannot read properties of undefined (reading 'id') SSR errors on five tutorial pages plus widgets-vs-tiles — because i18n/nl/ only carries stale translation strings, no actual translated markdown. Re-add 'nl' to the locales array once the Dutch translation pass is done or the metadata audited.

Verified

  • docusaurus build clean (was failing on nl SSR before)
  • build/screenshots/tutorials/user/01-first-launch-overview.png exists in the build output
  • All 20 modified markdown files have only image-path string changes (verified via diff)
  • Once merged + deployed: HEAD https://mydash.conduction.nl/screenshots/tutorials/user/05-context-menu.png → expect 200

… 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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Quality Report — ConductionNL/mydash @ 8c1d638

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.

@rubenvdlinde rubenvdlinde merged commit 85f9b47 into development May 6, 2026
49 checks passed
@rubenvdlinde rubenvdlinde deleted the feature/fix-screenshot-paths branch May 6, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant