feat(share): rich link previews (Open Graph) for /watch pages

A shared /watch/{token} link is a client-rendered SPA, so a social crawler only
saw the generic index.html — a blank link card. The server now injects per-video
Open Graph / Twitter tags (title, channel, thumbnail) into the served HTML for
that route, so links unfurl richly in Messenger and other chat apps; real
browsers ignore the extra tags and hydrate the page as usual. Password /
expired / invalid links fall back to the generic card with no metadata leak.

Also shortens the generic site description used for search engines and link
previews.
This commit is contained in:
npeter83 2026-07-07 20:19:30 +02:00
parent 8c86c6b4a8
commit 8591e45747
3 changed files with 107 additions and 3 deletions

View file

@ -4,17 +4,21 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<!-- OG:START — the server replaces this block for /watch/{token} so shared links unfurl with
the video's title/channel/thumbnail; every other route keeps these generic defaults. -->
<!--OG:START-->
<title>Siftlode</title>
<meta
name="description"
content="Siftlode is a self-hosted, multi-user reader for your YouTube subscriptions — filter, sort, tag and search your feed, build playlists that sync both ways, and watch in a clean, ad-free interface."
content="A self-hosted, multi-user reader, subscription organizer and media center with download capabilities."
/>
<meta property="og:title" content="Siftlode" />
<meta
property="og:description"
content="A self-hosted, multi-user reader for your YouTube subscriptions — filter, sort, tag and search, build two-way-syncing playlists, and watch ad-free."
content="A self-hosted, multi-user reader, subscription organizer and media center with download capabilities."
/>
<meta property="og:type" content="website" />
<!--OG:END-->
</head>
<body>
<div id="root"></div>