Files
dealplustech-astroreal/docs/engineering-log/2026-09-08-armaflex-slug-rename.md
Kunthawat Greethong 52030b7d46 fix(armaflex): rename misspelled 'armflex' slug to 'armaflex' everywhere
- Route /armflex -> /armaflex (page file + nav/listing links)
- Image folder public/images/armflex/ -> public/images/armaflex/
- Fix gallery alt-text 'Armflex' -> 'Armaflex'
- Add nginx 301 redirect so old /armflex URL still works (SEO-safe)
- Update engineering log + handoff

Verified: npm run build (44 pages), tsc --noEmit, nginx -t,
live probe /armaflex/ 200, zero stale 'armflex' refs.
2026-09-08 17:52:12 +07:00

3.0 KiB
Raw Blame History

title, status, verified
title status verified
Armaflex product slug rename (armflex → armaflex) complete 2026-09-08

Armaflex Product Slug Rename (armflex → armaflex)

Plan Status

complete — the misspelled armflex product slug was renamed to armaflex (the correct Armaflex/Armacell brand spelling) across route, image folder, navigation, and alt-text, with an nginx 301 redirect added so the old URL does not break.

Code commit: (to be filled after commit) on main.

Changed Scope

  • Renamed page src/pages/armflex.astrosrc/pages/armaflex.astro (route /armflex/armaflex) via git mv (history preserved).
  • Renamed image folder public/images/armflex/public/images/armaflex/ (all 12 assets) via git mv.
  • Updated all route/image references: src/components/common/Header.astro, src/layouts/BaseLayout.astro (category slug + Armaflex subcategory slug), src/pages/all-products.astro, src/pages/404.astro, and the page's own image paths.
  • Corrected gallery alt="Armflex …"alt="Armaflex …" (5 images) in src/pages/armaflex.astro.
  • Added a 301 redirect in nginx.conf for the old misspelled paths:
    • location = /armflex { return 301 /armaflex; }
    • location = /armflex/ { return 301 /armaflex; }

Verification Evidence

  • npm run buildpass, 44 static pages; dist/armaflex/index.html generated (70.8 KB); dist/armflex/index.html gone; dist/images/armaflex/ populated; dist/images/armflex/ gone.
  • npx tsc --noEmitpass (no errors).
  • git diff --checkpass.
  • Source scan — grep -rn 'armflex' src | grep -v armaflex returns nothing (clean); all 5 nav/listing links now point to /armaflex.
  • Built output scan — no stale /armflex hrefs or images/armflex/ paths; gallery alt-text reads "Armaflex ภาพที่ 15"; H1 reads "Armaflex Class 1 ชนิดม้วน".
  • Live static probe (python3 -m http.server on dist/): GET /armaflex/ → 200, GET /images/armaflex/gallery-1.jpg → 200, old GET /armflex/ → 404 at the static layer (the nginx 301 intercepts it at deploy time).
  • nginx -t on the edited config (wrapped in the required events{}/http{} blocks) — syntax is ok / test is successful.

Tooling Limitations

  • npm test unavailable (no test script in package.json).
  • The nginx 301 was validated for syntax locally and by logic; it is served by EasyPanel's nginx container at deploy time, so the live armflex → armaflex redirect was not exercised against the production endpoint in this session.

Risks and Remaining Work

  1. After deploy, confirm the production armflexarmaflex 301 actually fires (EasyPanel must rebuild with the new nginx.conf).
  2. Confirm the real production domain before any domain-dependent SEO action (existing known limitation, unchanged).

Exact Next Action

Commit this change on main, then push and rebuild via EasyPanel; verify the /armflex/armaflex 301 and the /armaflex page on the production domain.