Skip to content

Commit 7a90cf9

Browse files
authored
feat: add og image (#24)
1 parent 5c0fc68 commit 7a90cf9

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const data = {
2+
name: "Inference AI",
3+
baseUrl: "https://hyperjump.tech/inferenceai"
4+
};

app/(inferenceai)/inferenceai/page.tsx

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,36 @@
1-
"use client";
2-
1+
import type { Metadata } from "next";
32
import InferenceAILangLayout from "./[lang]/layout";
43
import InferenceAIPage from "./[lang]/page";
4+
import {
5+
inferenceaiHeroDesc,
6+
inferenceaiHeroHeading
7+
} from "@/locales/.generated/server";
8+
import { data } from "./data";
9+
10+
export async function generateMetadata(): Promise<Metadata> {
11+
const { baseUrl, name } = data;
12+
const title = `${name} - ${inferenceaiHeroHeading("en")}`;
13+
14+
return {
15+
description: inferenceaiHeroDesc("en"),
16+
title,
17+
openGraph: {
18+
url: baseUrl,
19+
type: "website",
20+
title,
21+
images: [
22+
{
23+
url: "https://hyperjump.tech/images/inferenceai/inference-ai-og.png",
24+
width: 1200,
25+
height: 630,
26+
alt: `${name} Logo`,
27+
type: "image/png"
28+
}
29+
],
30+
siteName: name
31+
}
32+
};
33+
}
534

635
export default function NoLangInferenceAI() {
736
return (

app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Metadata } from "next";
22
import { GoogleAnalytics } from "@next/third-parties/google";
3-
import localFont from "next/font/local";
43
import "./globals.css";
54
import data from "@/data.json";
65
import { cn } from "@/app/utils/tailwind";
399 KB
Loading

0 commit comments

Comments
 (0)