Embeds
A context link on a topic renders as a card on the screen. The card gives the link a presence on the page — a preview of what the source contains, so readers can judge its relevance without leaving the tree. The topic file keeps the URL. It does not include the card. The topic page is Topic. At publish, a topic holds at most three links: Add topic / branch. Context links: Context links.
Cards show on the topic intro and on an expanded branch that owns the URL. A collapsed branch hides them.
| Platform | Card |
|---|---|
twitter | The official post when the URL is a status. Any other X URL is a link preview. |
youtube | The video frame. |
reddit | The thread frame when the URL is a comment thread. Otherwise a link preview. |
hackernews | Title, host, score, comment count, and author. |
lorediv | The live topic: title, type, author, and counts. A stored other row whose URL is still a Lorediv topic uses this same card. |
| Anything else | A link preview from the page's title and description. |
The Lorediv card reads the topic at render time. The pointer is the public URL or the topic id pasted into the link slot. Expanding a card loads that platform's frame or the official post. The compact row stays until the frame is ready.
Code
| Piece | Path |
|---|---|
| Router | apps/frontend/src/components/topic/ContextEmbed.tsx |
| Lorediv card | apps/frontend/src/components/topic/TopicEmbedCard.tsx |
| Live read | topics.getEmbedCard |