Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

feat: add theme color and favicon to OG metadata for account, group, and post routes

yoginth.com 3aa7fecc 543a7219

verified
+24 -4
+7 -1
apps/api/src/routes/og/getAccount.ts
··· 1 - import { STATIC_IMAGES_URL, TRANSFORMS } from "@hey/data/constants"; 1 + import { 2 + BRAND_COLOR, 3 + STATIC_IMAGES_URL, 4 + TRANSFORMS 5 + } from "@hey/data/constants"; 2 6 import escapeHtml from "@hey/helpers/escapeHtml"; 3 7 import { default as getAccountData } from "@hey/helpers/getAccount"; 4 8 import getAvatar from "@hey/helpers/getAvatar"; ··· 29 33 <meta charSet="utf-8" /> 30 34 <meta name="viewport" content="width=device-width" /> 31 35 <meta http-equiv="content-language" content="en-US" /> 36 + <meta name="theme-color" content="${BRAND_COLOR}" /> 32 37 <title>${escTitle}</title> 33 38 <meta name="description" content="${escDescription}" /> 34 39 <meta property="og:title" content="${escTitle}" /> ··· 43 48 <meta name="twitter:description" content="${escDescription}" /> 44 49 <meta name="twitter:image" content="${avatar}" /> 45 50 <meta name="twitter:site" content="@heydotxyz" /> 51 + <link rel="icon" href="https://hey.xyz/favicon.ico" /> 46 52 <link rel="canonical" href="https://hey.xyz${link}" /> 47 53 </head> 48 54 <body>
+7 -1
apps/api/src/routes/og/getGroup.ts
··· 1 - import { STATIC_IMAGES_URL, TRANSFORMS } from "@hey/data/constants"; 1 + import { 2 + BRAND_COLOR, 3 + STATIC_IMAGES_URL, 4 + TRANSFORMS 5 + } from "@hey/data/constants"; 2 6 import escapeHtml from "@hey/helpers/escapeHtml"; 3 7 import getAvatar from "@hey/helpers/getAvatar"; 4 8 import normalizeDescription from "@hey/helpers/normalizeDescription"; ··· 30 34 <meta charSet="utf-8" /> 31 35 <meta name="viewport" content="width=device-width" /> 32 36 <meta http-equiv="content-language" content="en-US" /> 37 + <meta name="theme-color" content="${BRAND_COLOR}" /> 33 38 <title>${escTitle}</title> 34 39 <meta name="description" content="${escDescription}" /> 35 40 <meta property="og:title" content="${escTitle}" /> ··· 44 49 <meta name="twitter:description" content="${escDescription}" /> 45 50 <meta name="twitter:image" content="${avatar}" /> 46 51 <meta name="twitter:site" content="@heydotxyz" /> 52 + <link rel="icon" href="https://hey.xyz/favicon.ico" /> 47 53 <link rel="canonical" href="https://hey.xyz/g/${group.address}" /> 48 54 </head> 49 55 <body>
+7 -1
apps/api/src/routes/og/getPost.ts
··· 1 - import { STATIC_IMAGES_URL, TRANSFORMS } from "@hey/data/constants"; 1 + import { 2 + BRAND_COLOR, 3 + STATIC_IMAGES_URL, 4 + TRANSFORMS 5 + } from "@hey/data/constants"; 2 6 import escapeHtml from "@hey/helpers/escapeHtml"; 3 7 import getAccount from "@hey/helpers/getAccount"; 4 8 import getAvatar from "@hey/helpers/getAvatar"; ··· 52 56 <meta charSet="utf-8" /> 53 57 <meta name="viewport" content="width=device-width" /> 54 58 <meta http-equiv="content-language" content="en-US" /> 59 + <meta name="theme-color" content="${BRAND_COLOR}" /> 55 60 <title>${escTitle}</title> 56 61 <meta name="description" content="${escDescription}" /> 57 62 <meta property="og:title" content="${escTitle}" /> ··· 66 71 <meta name="twitter:description" content="${escDescription}" /> 67 72 <meta name="twitter:image" content="${ogImageCandidates[0]}" /> 68 73 <meta name="twitter:site" content="@heydotxyz" /> 74 + <link rel="icon" href="https://hey.xyz/favicon.ico" /> 69 75 <link rel="canonical" href="https://hey.xyz/posts/${(post as any).slug}" /> 70 76 </head> 71 77 <body>
+3 -1
apps/api/src/utils/defaultMetadata.ts
··· 1 - import { STATIC_IMAGES_URL } from "@hey/data/constants"; 1 + import { BRAND_COLOR, STATIC_IMAGES_URL } from "@hey/data/constants"; 2 2 import { html } from "hono/html"; 3 3 4 4 const defaultMetadata = html` 5 5 <html> 6 6 <head> 7 7 <link rel="canonical" href="https://hey.xyz" /> 8 + <link rel="icon" href="https://hey.xyz/favicon.ico" /> 8 9 <meta name="application-name" content="Hey" /> 10 + <meta name="theme-color" content="${BRAND_COLOR}" /> 9 11 <meta name="description" content="A decentralized, and permissionless social media app built with Lens" /> 10 12 <meta property="og:title" content="Hey" /> 11 13 <meta property="og:type" content="website" />