Skip to content

Commit 91e9289

Browse files
committed
chore: add social tags
1 parent 4680524 commit 91e9289

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

frontends/catalog/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
REGISTRY_ENDPOINT=
22
BETA_SCRIPT_DEPLOYMENT_ID=
3-
BETA_API_KEY=
3+
BETA_API_KEY=
4+
VITE_PUBLIC_URL=https://supernode.store

frontends/catalog/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN pnpm install --frozen-lockfile
1111
FROM base AS build
1212
COPY --from=dev-deps /app/node_modules ./node_modules
1313
COPY . .
14+
ENV VITE_PUBLIC_URL="https://supernode.store"
1415
RUN pnpm build
1516

1617
FROM base AS prod-deps
@@ -23,5 +24,6 @@ WORKDIR /app
2324
COPY --from=prod-deps /app/node_modules ./node_modules
2425
COPY package.json pnpm-lock.yaml ./
2526
COPY --from=build /app/.output ./
27+
ENV VITE_PUBLIC_URL="https://supernode.store"
2628
EXPOSE 3000
2729
CMD ["node", "server/index.mjs"]
114 KB
Loading

frontends/catalog/src/routes/__root.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import { TanStackDevtools } from '@tanstack/react-devtools';
1414
import { Header } from '~/components/Header';
1515
import { Banner } from '~/components/ui/Banner';
1616

17+
// Utils
18+
import { generateSocialMetadata } from '~/utils/social';
19+
1720
import appCss from '~/styles.css?url';
1821

1922
export const Route = createRootRouteWithContext<{
@@ -29,8 +32,18 @@ export const Route = createRootRouteWithContext<{
2932
content: 'width=device-width, initial-scale=1',
3033
},
3134
{
32-
title: 'SuperNode Catalog',
35+
title: 'SuperNode',
36+
},
37+
{
38+
name: 'description',
39+
content: 'Supercharge your blockchain infrastructure',
3340
},
41+
...generateSocialMetadata(
42+
'SuperNode',
43+
'Supercharge your blockchain infrastructure',
44+
`${import.meta.env.VITE_PUBLIC_URL}/images/social/banner.jpg`,
45+
import.meta.env.VITE_PUBLIC_URL,
46+
),
3447
],
3548
links: [
3649
{ rel: 'stylesheet', href: appCss },
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export function generateSocialMetadata(title: string, description: string, imageUrl: string, pageUrl?: string) {
2+
if (!pageUrl) {
3+
return [];
4+
}
5+
return [
6+
{ property: 'og:title', content: title },
7+
{ property: 'og:description', content: description },
8+
{ property: 'og:image', content: imageUrl },
9+
{ property: 'og:url', content: pageUrl },
10+
{ name: 'twitter:title', content: title },
11+
{ name: 'twitter:description', content: description },
12+
{ name: 'twitter:image', content: imageUrl },
13+
{ name: 'twitter:url', content: pageUrl },
14+
];
15+
}

0 commit comments

Comments
 (0)