From e19e3683986d01d7003fb6b0b654998dd546b91f Mon Sep 17 00:00:00 2001 From: echo8 Date: Sun, 22 Dec 2024 21:24:03 +0900 Subject: [PATCH] add image to snippet metadata --- src/client/public/icon-512x512.png | Bin 0 -> 18692 bytes src/server/src/routes.ts | 6 +++++- src/server/src/util/env.ts | 6 ++++++ src/server/views/snippet.ejs | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/client/public/icon-512x512.png diff --git a/src/client/public/icon-512x512.png b/src/client/public/icon-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..16102a841a0656690ab89309df5c9142b7b5e6b5 GIT binary patch literal 18692 zcmeHvWmJ{TyZ6mzgM>(nGzv%wA}vTtBi)TCpma#r-YNpAalr2VDHqOLiWJ39pC8-qHsO~7HWo@g8 zwh&*XVkHPu)0*{6v|?lbd^=q$Hi9QT;?{I%7~i{?whq4u*K}6b-Qxc7y_x|BU$HqC zFYB=ZU*idz`nBo~G4CSsF#5OFeVc5$g43$9K2;!na79LK8pF+Q(|M7oo?GtvF~@v{|2I zrGICh5g>T&1BQa}fs$rL={LzPHRh^4`q16e7<~1`l2Vuml%A20tH!GR(~(o5!{L~% zP*+|8Jvj!vjkq;}PdB9t9`Lz?d)?)OhEfOgF4n71LnHB>*3G50eHt7F1O&r@tD0q{ zJAG?g&ifj!%UpBZbP3AInTZJ7j9{9xI5i65iaPm20k@i2Qo3$r%#d+7%guXQenFH_ zeDvYxpB;Dst4dn;m!E;j7!Zgx_@|$9`$4fSUOx(hHB90#8ir*2VyJ1}1E5j7*VR?4DECeh)J%K}lIy3Up6@P4ZSx z6U3AVrfMh0bDeCyV^a3!{qGH6kPH?$Rt59$cvTyh)?!Mm49h&3M5!t8kE%p?oNrN& z;qGl`zW)6U>M`bEPoz5 zjh{?6u04~?#Xl@163Rpg1W38tbf;HN?F9Kl+4`j^pYG3Doc)?oezEgsF@|>qD9He+ zVE)J5t+t)VFG;7UA?to0#h;Fq9wcU*XdVFuG%*n2i54h?*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z2ePg0``_Ekeftj; zh|vEV{5DEFSjyth$^q^eQ-pE3u(1F0i5U`0QMK`S9qPKPf&VO=ng7oRzyg!Ax_b=i z=pg%0zOjU=e`tD!Wv}gZIPwx3A?%80J<&iA=1d*WopbdMk0g9x-jN)->h;H)yLT}W zF6kNVp<1^Zs`6!jQwU)^!F zJY&7H2%<6h3Q*mEtlJ-ngQpW16Za|3ph;=)s)M^2HIeeAf8K?_C2v*p@-ko&k=?~Z zkmk6pToZOQYe+A>hTHbf^A3L=hIrZ>;y!+ov_gCUO+Hst<~$lX!cb`y;9>b=YzT=| zc*V)C`x$en{gpAWR)KzL?x&vv%(N5>*W&>Y`z@SATpBG_E#vU(_2liBet?${ULaoJ zy_AzKC7%1MVHaR2YK+RUd_2RgB?RaJS!9>oU%TDykUQ7kXt-2L7XM?7J-yT~Vvta6 zU-rg(sT7P7+cv7dY`e=qW1srw4YEWw&;b(SgZFB%^66-F=!Kino^xONMzQJ7by4)I z8XK=3#9sm2fh#NJ-FW;e{nG~1XM^*Z_T`Z6VW&VFL#AAvts7OrK3+w*hYhhr-W9~B`bLZSYZV{kk7E$h`28@++wJS(pj4Qf>U6=qW?7T1-sv z2k%_de4=pzNJTc7YNofpAcUR9o-;>2U*W^0-*$|IaBa0%du3P>h2(+q?B&`!TtIx* z&jN4AI98QPr5x3Apvnj~9Cju&1AB;aLLmb1rgR;I zaj7YOJHUIX^swHafrcwtt<{rW62tz^!{HejF~BQ?E3B4zMNOzqGo|a2LdV`(WK6Y2 ow=UjGUEqTwV+HJ@7b4H-pU$e!6vwdEL*S2sjEZ!jl-bk&2mfQS-T(jq literal 0 HcmV?d00001 diff --git a/src/server/src/routes.ts b/src/server/src/routes.ts index f399b66..6c63b3b 100644 --- a/src/server/src/routes.ts +++ b/src/server/src/routes.ts @@ -52,7 +52,11 @@ export const createExpressRouter = (ctx: AppContext) => { const snippet = await ctx.snippetService.get(did, rkey); if (snippet) { const url = `${env.PUBLIC_URL}/user/${snippet.authorDid}/snippet/${snippet.rkey}`; - return res.render("snippet", { snippet: snippet, url: url }); + return res.render("snippet", { + snippet: snippet, + url: url, + imageUrl: env.OG_IMAGE_URL, + }); } } return res.status(404).send(); diff --git a/src/server/src/util/env.ts b/src/server/src/util/env.ts index d7241c5..1c7950e 100644 --- a/src/server/src/util/env.ts +++ b/src/server/src/util/env.ts @@ -53,4 +53,10 @@ export const env = cleanEnv(process.env, { dev: "ws://localhost:6008/subscribe", }), }), + OG_IMAGE_URL: str({ + default: match({ + prod: "https://pastesphere.link/icon-512x512.png", + dev: "http://pastesphere.localhost/icon-512x512.png", + }), + }), }); diff --git a/src/server/views/snippet.ejs b/src/server/views/snippet.ejs index 0f1e0ce..a2ce758 100644 --- a/src/server/views/snippet.ejs +++ b/src/server/views/snippet.ejs @@ -10,6 +10,7 @@ +