Skip to content

feat: hover previews for internal post links#20

Merged
benthecoder merged 2 commits into
mainfrom
link-previews
Jul 12, 2026
Merged

feat: hover previews for internal post links#20
benthecoder merged 2 commits into
mainfrom
link-previews

Conversation

@benthecoder

@benthecoder benthecoder commented Jul 12, 2026

Copy link
Copy Markdown
Owner

hovering a link to another post inside markdown now shows a card with its title, date, and a 40-word excerpt — markdown links get the data resolved on the server during static rendering. archive rows get the same card, but since shipping 1023 excerpts in the page payload would bloat it, they lazily fetch from a prerendered /api/post-preview/[slug] route on first hover.

til: floating-ui's safePolygon() handler keeps the card open while your cursor travels diagonally from the link to the card — it computes a triangle between cursor and floating element and only closes when you leave it. also: a route handler with force-static + generateStaticParams becomes 1023 tiny json files at build time, served from the cdn like any static asset.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 12, 2026 6:37am

@benthecoder
benthecoder merged commit 39b361f into main Jul 12, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant