show garden posts on /universe + video heroes for essay previews
Created by: jedmund
Summary
- Garden items with
showInUniverse: true+ anotenow appear on the/universepage, not just in the RSS feed. NewUniverseGardenCard(category eyebrow, cover image, creator, excerpt) rendered alongside posts and albums, sorted bypublishedAtdesc. - Essay-type posts now extract the first image or video node from their body and show it as a hero above the text excerpt. Videos render as a silent
<video preload=metadata>(no controls) with a play-icon overlay — reads as a still but signals playability. Previously a video buried in an essay never surfaced on the list page. -
UniverseCardgained a'garden'type and an optionalhrefoverride so Garden items link to/garden/{category}/{slug}.
Scope: only essays get hero-hoisting. Non-essay post types (notes, threads) already render their full content inline in the preview, so media is already visible.
Test plan
-
/universe— Garden item opted into Universe shows up as a card with cover image, category eyebrow, creator, excerpt; clicking goes to/garden/{category}/{slug} -
/universe— Garden item not opted in (showInUniverse: false) does not appear -
/universe— Garden item with nullnotedoes not appear (prevents bare catalog entries) -
Sort order: Garden items interleave correctly with Posts/Albums by publishedAt -
Essay with a video in the body — video surfaces as a hero with a play overlay; clicking the hero goes to /universe/{slug} -
Essay with an image in the body (no video) — image surfaces as hero -
Essay with a URL embed takes precedence — embed shows, hero does not (avoids double media) -
Non-essay post (note/thread) with inline media — behaves identically to before (no extra hero)