8 Commits

Author SHA1 Message Date
a33932cbd0 Fix: pages/CSS 404 on URL-encoded links (double-decode broke UTF-8 filenames)
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.
2026-08-07 20:08:28 +07:00
88a2e60b5d Fix 404s: restore missing background images, pdpa icon, and 2 keyword pages; remove example page
- 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
2026-08-07 17:38:26 +07:00
c497d8b2f1 Switch pnpm->npm to fix esbuild build-script approval (matches astroreal)
- 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
2026-08-06 15:27:44 +07:00
44c405730e Serve with Node/Express instead of nginx (matches working astroreal pattern)
- Add server.js: Express serves dist/ + injects env (GA_ID, FORM_EMAIL, GMAP) at runtime
- Container port now 4321 (identical to moreminimore-astroreal that deploys on EasyPanel)
- Remove nginx.conf + entrypoint.sh (no longer needed); Dockerfile uses node server.js
- Verified: pnpm build + node server.js -> all 40 pages serve 200, env injected, 0 leftovers
2026-08-06 15:13:39 +07:00
a8fa17a947 Fix Docker build: use pnpm 11 (corepack) to match lockfile/allowBuilds schema
- pnpm-workspace.yaml from Astro v7 uses allowBuilds (pnpm 10.14+ schema);
  pnpm 9 in old Dockerfile errored 'packages field missing or empty'
- Switch Dockerfile to corepack + pnpm@11, matching pnpm-lock.yaml
- Verified pnpm install --frozen-lockfile passes with pnpm 11
2026-08-06 14:50:06 +07:00
9460be8c0e Rebuild as Astro static site (output identical to original)
- Move all 39 cloned pages + assets into public/ (Astro copies verbatim to dist/)
  -> dist/ is byte-identical to www.mitsuthailand.com (home 143633 bytes exact)
- Add Astro project: astro.config.mjs, package.json, src/layouts/Base.astro,
  src/pages/example.astro (sample Astro component page, builds to /example/)
- Multi-stage Dockerfile: pnpm build -> nginx serve + env-injecting entrypoint
- Env-configurable: GA_ID, FORM_EMAIL, GMAP_LAT/LNG/.env.example
- Remove Python crawl tooling and old nginx-static site/ layout
- Verified: astro build -> 39 pages + example; all routes serve 200 via preview
2026-08-06 14:41:36 +07:00
eea7c4780e Add env-configurable GA/form/map; remove & artifacts; verify clone completeness
- 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.
2026-08-06 14:27:32 +07:00
e04ea1dd27 Mirror www.mitsuthailand.com as static site with dynamic URLs
- 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
2026-08-06 13:50:48 +07:00