From 960afb18e0bc3bcdbd827c34591310717905b5bb Mon Sep 17 00:00:00 2001 From: yinebebt Date: Wed, 8 Apr 2026 02:43:44 +0300 Subject: [PATCH] fix: improve OG preview templates for Telegram and social crawlers Replace meta http-equiv refresh with JS redirect so crawlers read OG tags before redirect fires. Add og: prefix, Twitter card meta tags, and conditional og:image rendering to avoid empty image tags. --- templates/default/link.html | 13 ++++++++++--- templates/default/preview.html | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/templates/default/link.html b/templates/default/link.html index 193b097..8ffb6d3 100644 --- a/templates/default/link.html +++ b/templates/default/link.html @@ -1,17 +1,24 @@ - + {{.Title}} + - + {{if .ImageURL}} + + {{end}} - + + + + {{if .ImageURL}}{{end}}

Redirecting to {{.URL}}.

+ diff --git a/templates/default/preview.html b/templates/default/preview.html index 232ac13..263f286 100644 --- a/templates/default/preview.html +++ b/templates/default/preview.html @@ -1,14 +1,21 @@ - + {{.Title}} + - + {{if .ImageURL}} + + {{end}} + + + + {{if .ImageURL}}{{end}}