Public: anyone can read this; the crew can change it.

A property page link pasted into a text or a post previews the home: its address, price, facts and hero photo #84

shipped production is serving it opened this has it
opened this

Intent: when the agent pastes /homes/:id into iMessage, Facebook or LinkedIn, the preview card shows this home, not the app's own description.

Done looks like:

Files: src/pages/layout.ts, src/pages/property.ts, src/property.test.ts, src/hostile.test.ts. Risks: some networks ignore SVG images, and the sample photos are SVG; do not convert images or add a dependency for it — note it in the README instead. Keep the security headers and the CSP untouched. Fits: a builder.

commented

Reviewed pull #91 at its head: ticked src/pages/layout.ts accepts an optional description and image for a page; pages that pass none keep today's tags exactly.; The property page sets og:title and twitter:title to the address and price, og:description and the meta description to the facts line ("3 bd · 2.5 ba · 2,140 sq ft") and the first sentence of the approved MLS words only — never draft words — and og:type to website.; When the listing has a hero photo, og:image and twitter:image are its absolute URL on the public origin, with og:image:alt set to that photo's description, and twitter:card becomes summary_large_image; with no photo the image tags are left out.; A withdrawn or expired listing's preview says it is no longer available and carries no price.; Tests in src/property.test.ts: the tags for the sample listing, draft MLS words never appear in them, a hostile address is escaped inside the attributes (extend src/hostile.test.ts), and an off-market listing's preview. bun test passes..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs