← back to Dw Yolo Loop

scripts/brands-page/README.md

44 lines

# Brands page (/pages/brands) redesign — "Shop by Brand"

Rebuilds the live Shopify page (id 79444574259, handle `brands`, store
designer-laboratory-sandbox = PRODUCTION) into a pill-tile logo grid matching
/pages/commercial-wallcoverings.

## Files
- `brands-map.json`  — brand → collection href + existing logo (scraped from old page)
- `probed-logos.json`— additional logos found by probing the Shopify CDN by filename
- `build-brands.cjs` — generates `page-brands-new.html` (the new body_html)
- `push-brands.cjs`  — PUTs body_html to the page via SHOPIFY_DW_ADMIN_TOKEN_CONTENT (write_content)
- `page-brands-OLD-backup.html` — original body_html for rollback

## Hard rules baked in
- DROP set: `WallQuest` (real vendor name = Malibu Wallpaper private label), `Nicolette Mayer` (hidden/archived).
- BANNED regex gate aborts the push if any upstream vendor name (wallquest/chesapeake/
  brewster/nextwall/seabrook/nicolette) appears in the output.
- HOUSE labels (British Walls, LEED Walls, LA Walls, Primo Leathers, Surface Stick,
  Novasuede, Ultrasuede, DW Bespoke/Exclusive, Steve Abrams Studios, Zeuxis) → wordmark, never an upstream logo.
- FORCE_WM: brands whose hosted "logo" file is actually wrong/generic
  (Brunschwig & Fils & Gaston Y Daniela = generic Kravet logo; Donghia = Rubelli;
  Harlequin = product photo; Threads = GP&J Baker logo; Mulberry = wrong mark) → wordmark.

## TODO (needs a write_files-scoped token)
- 51 brands render as typographic wordmarks because no clean logo is self-hosted and
  the available tokens lack `write_files` to re-host sourced logos. To upgrade those to
  real image-logos: get a token with write_files, source logos, upload to Shopify Files,
  add to brands-map and re-run build+push.

## Rollback
`node push-brands.cjs` after copying page-brands-OLD-backup.html → page-brands-new.html

## FINAL STATE (2026-06-13)
- `/pages/brands` (page id **207651110963**, handle `brands`) = LIVE with new design
  (62 real logos + ~25 vendor room images + tightened 6-col grid; leak-free). Confirmed
  via independent Shopify edge IP 23.227.38.74 ("fabric houses" subtitle).
- The 45min+ "stuck cache" was a single stale local edge node (LAX); new render
  propagated across Shopify's edge network. See memory dw-shopify-store-and-page-cache.
- `/pages/brands-preview` (page id 207649374259) = UNPUBLISHED per DTD verdict C
  (unanimous 3/3): body retained as a one-flip fallback, hidden from storefront+search,
  no duplicate-content/SEO risk. Republish with published=true if /pages/brands re-freezes.
- Original old page (79444574259) was deleted during the cache fight; old body snapshot
  in page-79444574259-snapshot.json + page-brands-OLD-backup.html.