Render the privacy policy and service pages through one content-block renderer #229
Labels
No Label
P0
P1
P2
P3
accessibility
backend
bug
content
data-integrity
enhancement
frontend
infra
integration
owner
owner-input
performance
phase-7
phase-8
release-blocker
security
seo
ui
ux
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Queue-North-Website#229
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is true now.
src/pages/PrivacyPolicy.jsx:31-84holds the site's only block renderer, and sends an unknowntypetoParagraph, which renders an empty<p>: a misspelt type silently drops the block. The long-form service pages need the same vocabulary plusol,imageandlinks.What to do.
src/components/content/ContentBlocks.jsx:p(with link segments),h3,ul,ol(with optional detail lines),callout,image(a figure only whensrcis set),links. It throws on an unknown type, naming the section id and block index, so the prerender fails instead of shipping a gap.emailandcontactBlockrenderers as extra entries, the same renderer rather than a fork.src/components/content/RelatedLinks.jsx, shared byServiceDetailandIndustryDetail.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 -rof the normalizeddist/before and after prints nothing, and a privacy block withtype: 'emial'fails the build naming the route, section and block index.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"'.