Skip to content

Commit 5dd95ca

Browse files
authored
Prettify google search result (#76)
1 parent ac629bc commit 5dd95ca

File tree

3 files changed

+74
-3
lines changed

3 files changed

+74
-3
lines changed

app/layout.tsx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,22 @@ import { getClientConfig } from "./config/client";
66
import { type Metadata } from "next";
77

88
export const metadata: Metadata = {
9+
metadataBase: new URL("https://chat.webllm.ai"),
910
title: "WebLLM Chat",
1011
description:
1112
"Chat with AI large language models running natively in your browser. Enjoy private, server-free, seamless AI conversations.",
13+
keywords: [
14+
"WebLLM",
15+
"AI chat",
16+
"machine learning",
17+
"browser AI",
18+
"language model",
19+
"no server",
20+
],
21+
authors: [{ name: "WebLLM Team" }],
22+
publisher: "WebLLM",
23+
creator: "WebLLM",
24+
robots: "index, follow",
1225
viewport: {
1326
width: "device-width",
1427
initialScale: 1,
@@ -22,6 +35,32 @@ export const metadata: Metadata = {
2235
title: "WebLLM Chat",
2336
statusBarStyle: "default",
2437
},
38+
openGraph: {
39+
type: "website",
40+
url: "https://chat.webllm.ai",
41+
title: "WebLLM Chat",
42+
description:
43+
"Chat with AI large language models running natively in your browser",
44+
siteName: "WebLLM Chat",
45+
images: [
46+
{
47+
url: "https://chat.webllm.ai/mlc-logo.png",
48+
width: 360,
49+
height: 360,
50+
alt: "WebLLM Chat - Browser-based AI conversation",
51+
},
52+
],
53+
},
54+
twitter: {
55+
card: "summary_large_image",
56+
title: "WebLLM Chat",
57+
description:
58+
"Chat with AI large language models running natively in your browser",
59+
images: ["https://chat.webllm.ai/mlc-logo.png"],
60+
},
61+
alternates: {
62+
canonical: "https://chat.webllm.ai",
63+
},
2564
};
2665

2766
const cspHeader = `
@@ -78,6 +117,30 @@ export default function RootLayout({
78117
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#062578" />
79118
<meta name="msapplication-TileColor" content="#2b5797" />
80119
<meta name="theme-color" content="#ffffff" />
120+
<script
121+
type="application/ld+json"
122+
dangerouslySetInnerHTML={{
123+
__html: JSON.stringify({
124+
"@context": "https://schema.org",
125+
"@type": "WebApplication",
126+
name: "WebLLM Chat",
127+
url: "https://chat.webllm.ai",
128+
description:
129+
"Chat with AI large language models running natively in your browser. Enjoy private, server-free, seamless AI conversations.",
130+
applicationCategory: "Artificial Intelligence",
131+
offers: {
132+
"@type": "Offer",
133+
price: "0",
134+
priceCurrency: "USD",
135+
},
136+
operatingSystem: "Web Browser",
137+
creator: {
138+
"@type": "Organization",
139+
name: "WebLLM",
140+
},
141+
}),
142+
}}
143+
/>
81144
</head>
82145
<body>{children}</body>
83146
</html>

public/robots.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
User-agent: *
2-
Disallow: /
3-
User-agent: vitals.vercel-insights.com
4-
Allow: /
2+
Allow: /
3+
Sitemap: https://chat.webllm.ai/sitemap.xml

public/sitemap.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://chat.webllm.ai/</loc>
5+
<lastmod>2025-05-05</lastmod>
6+
<changefreq>monthly</changefreq>
7+
<priority>1.0</priority>
8+
</url>
9+
</urlset>

0 commit comments

Comments
 (0)