Skip to content

show garden posts on /universe + video heroes for essay previews

jedmund requested to merge jedmund/garden-in-universe into main

Created by: jedmund

Summary

  • Garden items with showInUniverse: true + a note now appear on the /universe page, not just in the RSS feed. New UniverseGardenCard (category eyebrow, cover image, creator, excerpt) rendered alongside posts and albums, sorted by publishedAt desc.
  • 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.
  • UniverseCard gained a 'garden' type and an optional href override 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 null note does 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)

Merge request reports

Loading