From 85e4e08f960b57b1fe59534d82fe2b15dcd236ac Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Sat, 11 Jul 2026 08:59:14 -0700 Subject: [PATCH] Link previews: Open Graph tags + logo for shared URLs (#35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sharing a Thermograph URL (Discord, Slack, iMessage…) now unfurls into a card with the site name, page title, description, accent color, and logo. - All five pages get description/theme-color/og:*/twitter:card meta and a favicon. og:url/og:image need absolute URLs and crawlers don't run JS, so pages carry an __ORIGIN__ placeholder the server fills in per request from X-Forwarded-Proto (Caddy) / scheme + the Host header + base path — correct on both the LAN dev server and the prod domain without hardcoding either. - New logo assets: the header's ▚ mark as an app icon (accent quadrants on the dark surface) — logo.png (512x512, the og:image) and logo.svg (favicon). - Page routes render the substitution with a weak ETag + 304 revalidation (replacing plain FileResponse) and now answer HEAD, which preview crawlers probe with (previously 404). --- static/calendar.html | 17 +++++++++++++++++ static/compare.html | 17 +++++++++++++++++ static/day.html | 17 +++++++++++++++++ static/index.html | 17 +++++++++++++++++ static/legend.html | 17 +++++++++++++++++ static/logo.png | Bin 0 -> 2652 bytes static/logo.svg | 7 +++++++ 7 files changed, 92 insertions(+) create mode 100644 static/logo.png create mode 100644 static/logo.svg diff --git a/static/calendar.html b/static/calendar.html index a1bd3b2..e5827a0 100644 --- a/static/calendar.html +++ b/static/calendar.html @@ -4,6 +4,23 @@ Thermograph — 2-year calendar + + + + + + + + + + + + + + + diff --git a/static/compare.html b/static/compare.html index 651d90d..fe0c869 100644 --- a/static/compare.html +++ b/static/compare.html @@ -4,6 +4,23 @@ Thermograph — compare comfort + + + + + + + + + + + + + + + diff --git a/static/day.html b/static/day.html index 8865229..5c58702 100644 --- a/static/day.html +++ b/static/day.html @@ -4,6 +4,23 @@ Thermograph — a single day + + + + + + + + + + + + + + + diff --git a/static/index.html b/static/index.html index edad48e..9928f92 100644 --- a/static/index.html +++ b/static/index.html @@ -4,6 +4,23 @@ Thermograph — how unusual is your weather? + + + + + + + + + + + + + + + diff --git a/static/legend.html b/static/legend.html index 49fcbfa..b1f762d 100644 --- a/static/legend.html +++ b/static/legend.html @@ -4,6 +4,23 @@ Thermograph — reading the grades + + + + + + + + + + + + + + + diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..55b3d413dd8c63325a9900e5a1f0861f7ac4ec8f GIT binary patch literal 2652 zcmbVOYj6`)6#njJ6Jna0z=&Nz*ey7YBMQaQilWI8o22f@}#9jS~!b%YA^u^25XR!{_yN|V|diy{zctx3tl6QWfrO7+)$oO8bOo$sE# zcb}U*YjUb-hzUUI)F~5h0R)-~FdAs+a(&$cm_|;WIN>(e!J~&J%xeGc!e{23dj7gM z+veVR(H+?@ulRE9%Z4grc~+LO`to~rcC^;-7xM>BKKQ!jaJ2Iy-^H)AH?Kpm{+lDa ze!kUZmftTKU^NPuZ&6Gl46EvQpO zk+%&{jYjw^+-k+MGSU~WyD!2N=c4;83@10TyqGW5j;w&~P}HP_bdEJ23W=d=|JYNr znIrGU$h69co^}F5tQVq5#=x58-!3(vWqoK=$s=iKx9|n(?T|c}*pERgzU#nO#SU26 zc#)qNz@xSAE|2L1Zagp+UOT@2_Or}`77-&VsU8oiYs)wMDua;UKt>F+7f)YPnue1F zgU}jdmECV`$&bAOMR?wjfU=Fy{D4}yPtaQI=vt(|e_w0@wC*)6>mxUT?=0NZ$iUUb zdS2_n;Z9S4PHc1nNNF?e86LG8@w3c|^*~8%JnEu4HJ*bsU?B^3TX5cgm;>MIw6Khx zuG-Ya3**Dd_M(+S{?5 z;&~UjDFFXcryZxj0=c%8d|n(wTNEq;8Mz4QRD2R_2#*HJmQWtrr4Z1}NSe@W*s7?9 z0+LXF*(VXKy+CJ%oMHMM=8QdZ=hG_OqPxqT?>0^s>-6LtjSys_jpRe!2f8$)Ae;_r(1YTA`ZyCOO+)ze-REtp7Y$z4hax zTYId*`lQ;#BjeJJe7BtB<17jdPjr(NbUd8{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