Render the privacy policy and service pages through one content-block renderer #229

Closed
opened 2026-09-10 04:13:35 -05:00 by null · 1 comment
Owner

What is true now. src/pages/PrivacyPolicy.jsx:31-84 holds the site's only block renderer, and sends an unknown type to Paragraph, which renders an empty <p>: a misspelt type silently drops the block. The long-form service pages need the same vocabulary plus ol, image and links.

What to do.

  • src/components/content/ContentBlocks.jsx: p (with link segments), h3, ul, ol (with optional detail lines), callout, image (a figure only when src is set), links. It throws on an unknown type, naming the section id and block index, so the prerender fails instead of shipping a gap.
  • PrivacyPolicy passes its email and contactBlock renderers as extra entries, the same renderer rather than a fork.
  • src/components/content/RelatedLinks.jsx, shared by ServiceDetail and IndustryDetail.

Trap. The privacy page's prerendered HTML must not change by a byte; Meta's crawler reads it and ad lead forms depend on it. Copy the JSX verbatim, including prop order and the {number}.</span> {title} structure that React's text separators depend on.

Verify: diff -r of the normalized dist/ before and after prints nothing, and a privacy block with type: 'emial' fails the build naming the route, section and block index.

**What is true now.** `src/pages/PrivacyPolicy.jsx:31-84` holds the site's only block renderer, and sends an unknown `type` to `Paragraph`, which renders an empty `<p>`: a misspelt type silently drops the block. The long-form service pages need the same vocabulary plus `ol`, `image` and `links`. **What to do.** - `src/components/content/ContentBlocks.jsx`: `p` (with link segments), `h3`, `ul`, `ol` (with optional detail lines), `callout`, `image` (a figure only when `src` is set), `links`. It throws on an unknown type, naming the section id and block index, so the prerender fails instead of shipping a gap. - PrivacyPolicy passes its `email` and `contactBlock` renderers as extra entries, the same renderer rather than a fork. - `src/components/content/RelatedLinks.jsx`, shared by `ServiceDetail` and `IndustryDetail`. **Trap.** The privacy page's prerendered HTML must not change by a byte; Meta's crawler reads it and ad lead forms depend on it. Copy the JSX verbatim, including prop order and the `{number}.</span> {title}` structure that React's text separators depend on. Verify: `diff -r` of the normalized `dist/` before and after prints nothing, and a privacy block with `type: 'emial'` fails the build naming the route, section and block index.
null added this to the Batch 18: Guards and landmines found building Batch 17 milestone 2026-09-10 04:13:35 -05:00
null added the
frontend
enhancement
labels 2026-09-10 04:13:35 -05:00
null closed this issue 2026-09-10 04:45:52 -05:00
Author
Owner

Done in 7ec4241. src/components/content/ContentBlocks.jsx is now the site's only block renderer (p with inline links, h3, ul, ol with optional step detail, callout, image, links) and throws on an unknown block type instead of rendering an empty paragraph; PrivacyPolicy passes its email and contactBlock renderers in rather than forking it. src/components/content/RelatedLinks.jsx is shared by the service and industry pages and renders nothing without links. Proven: dist/privacy-policy/index.html is byte-identical before and after the migration, 82,392 bytes both times with asset hashes normalised; and a block type misspelt as 'emial' fails the build with 'prerender: /privacy-policy could not be rendered: content: section "marketing", block 3: unknown block type "emial"'.

Done in 7ec4241. src/components/content/ContentBlocks.jsx is now the site's only block renderer (p with inline links, h3, ul, ol with optional step detail, callout, image, links) and throws on an unknown block type instead of rendering an empty paragraph; PrivacyPolicy passes its email and contactBlock renderers in rather than forking it. src/components/content/RelatedLinks.jsx is shared by the service and industry pages and renders nothing without links. Proven: dist/privacy-policy/index.html is byte-identical before and after the migration, 82,392 bytes both times with asset hashes normalised; and a block type misspelt as 'emial' fails the build with 'prerender: /privacy-policy could not be rendered: content: section "marketing", block 3: unknown block type "emial"'.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Queue-North-Website#229
No description provided.