Express already decodes req.path; the extra decodeURIComponent re-decoded
UTF-8 filenames and returned 404 for URL-encoded links (as used by the
original site), so page CSS didn't load and buttons looked unstyled.
Now all 41 pages + all CSS/assets serve 200 via encoded URLs; 0 404.
- Download 4 background images (style background-image url) that the crawler missed
(68957b9b6d5ab/6895a7249d911/6895a1529ef30/6895bd967860b) + pdpa cookie icon
- Restore 2 deleted keyword pages (Mitsubishi MEGA CAB, SINGLE CAB) - were wrongly
cleaned as artifacts earlier
- Remove src/pages/example.astro (extraneous /example not in original)
- Verify via running server: 41 pages all 200, 0 404 across all links/assets
- pnpm 11 (brew/corepack) errors 'ERR_PNPM_IGNORED_BUILDS: esbuild ignored'
even with onlyBuiltDependencies; npm ci handles esbuild cleanly
- Moreminimore-astroreal uses npm ci + npm run build (proven on EasyPanel)
- Add esbuild as direct dep, generate package-lock.json, remove pnpm files
- Dockerfile: npm ci -> npm run build -> node server.js (port 4321)
- Verified: npm ci + npm run build produce dist (40 pages) successfully
- Remove 4 stray '&' files (crawl artifact) that duplicated footer/about-us/contactus/root
- Replace hardcoded GA id, form email, map src with placeholders (GA_ID, FORM_EMAIL, GMAP_EMBED)
- Add entrypoint.sh: envsubst injects env vars into HTML at container startup
- Add .env.example + .dockerignore/.gitignore guarding .env secrets
- Google Map type A (free embed, no API key) configurable via GMAP_LAT/LNG
- Verify: all 39 pages, images (38/home), content blocks (296) match original; 0 missing assets
Full clone comparison against www.mitsuthailand.com confirms sections complete.
- Full static mirror of the YellowPages/Drupal site (39 pages + all assets)
- All URLs rewritten to relative/domain-agnostic form (works on any domain)
- RFQ + request-quotation + contact forms converted to email (FormSubmit.co)
- Google Maps embed replaced with static Google Maps iframe
- nginx Dockerfile + config for EasyPanel deployment
- mirror.py/rewrite.py/cleanup.py tooling for re-crawling updates