Skip to content

Commit 41b16f0

Browse files
authored
Merge pull request #76 from MeshJS/feat-seo-and-meta
Improve SEO with structured data and AI crawler support; update guides
2 parents 748d038 + 9c0e9a5 commit 41b16f0

29 files changed

+2259
-420
lines changed

apps/docs/.env.example

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
BACKEND_BASE_URL=
2-
API_KEY=
1+
# Mimir RAG backend configuration
2+
MIMIR_BASE_URL=http://localhost:3000
3+
MIMIR_API_KEY=your-api-key-here
4+
5+
# SEO Verification Codes (Optional - Add when ready)
6+
# Get these from respective webmaster tools:
7+
# Google Search Console: https://search.google.com/search-console
8+
# Bing Webmaster Tools: https://www.bing.com/webmasters
9+
# Yandex Webmaster: https://webmaster.yandex.com
10+
11+
NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION=
12+
NEXT_PUBLIC_BING_SITE_VERIFICATION=
13+
NEXT_PUBLIC_YANDEX_SITE_VERIFICATION=
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
22
import { convertToModelMessages, streamText } from 'ai';
33

4-
//export const runtime = 'edge';
4+
export const runtime = 'edge';
55
const apiKey = process.env.API_KEY;
66
const baseURL = process.env.BACKEND_BASE_URL;
77

apps/docs/app/layout.tsx

Lines changed: 215 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,82 @@ const inter = Inter({
1010

1111
// Export the metadata object
1212
export const metadata: Metadata = {
13-
title: 'Mesh',
14-
description: 'Web3 TypeScript SDK',
13+
metadataBase: new URL('https://meshjs.dev'),
14+
title: {
15+
default: 'Mesh - Open-Source TypeScript SDK for Cardano Blockchain Development',
16+
template: '%s | Mesh SDK',
17+
},
18+
description: 'Mesh is the open-source TypeScript SDK that helps developers build better Cardano blockchain applications faster. Ship UTXO dApps with ease using our comprehensive suite of tools, React components, and transaction builders. Less than 60kB, production-ready, with 1M+ downloads.',
19+
keywords: [
20+
'Cardano',
21+
'TypeScript SDK',
22+
'Web3',
23+
'blockchain development',
24+
'Cardano SDK',
25+
'dApp development',
26+
'smart contracts',
27+
'Cardano API',
28+
'blockchain tools',
29+
'UTXO',
30+
'Cardano wallet',
31+
'NFT',
32+
'Plutus',
33+
'Aiken',
34+
'React hooks',
35+
'Web3 development',
36+
'Cardano TypeScript',
37+
'mesh sdk',
38+
'cardano javascript',
39+
'cardano dapp',
40+
'cardano smart contracts',
41+
'blockchain sdk',
42+
'web3 sdk',
43+
'cardano development',
44+
'cardano tools',
45+
'cardano library',
46+
'cardano npm',
47+
'cardano react',
48+
'decentralized applications',
49+
],
50+
authors: [{ name: 'MeshJS', url: 'https://meshjs.dev' }],
51+
creator: 'MeshJS',
52+
publisher: 'MeshJS Pte. Ltd.',
53+
applicationName: 'Mesh',
54+
generator: 'Next.js',
55+
referrer: 'origin-when-cross-origin',
56+
category: 'technology',
57+
classification: 'Blockchain Development Tools',
58+
alternates: {
59+
canonical: 'https://meshjs.dev',
60+
types: {
61+
'application/rss+xml': 'https://meshjs.dev/rss.xml',
62+
},
63+
},
64+
openGraph: {
65+
type: 'website',
66+
locale: 'en_US',
67+
url: 'https://meshjs.dev',
68+
siteName: 'Mesh - Cardano TypeScript SDK',
69+
title: 'Mesh - Open-Source TypeScript SDK for Cardano Blockchain Development',
70+
description: 'Ship UTXO dApps faster with Mesh. The open-source TypeScript SDK for Cardano blockchain development with React components, wallet integrations, and transaction builders. Trusted by 1M+ downloads.',
71+
images: [
72+
{
73+
url: '/home/hero.png',
74+
width: 1200,
75+
height: 630,
76+
alt: 'Mesh - TypeScript SDK for Cardano - Build dApps faster',
77+
type: 'image/png',
78+
},
79+
],
80+
},
81+
twitter: {
82+
card: 'summary_large_image',
83+
site: '@meshsdk',
84+
creator: '@meshsdk',
85+
title: 'Mesh - Open-Source TypeScript SDK for Cardano',
86+
description: 'Ship UTXO dApps faster with Mesh. Less than 60kB, production-ready, with 1M+ downloads. Build Cardano blockchain applications with TypeScript.',
87+
images: ['/home/hero.png'],
88+
},
1589
icons: {
1690
icon: '/favicon.ico',
1791
shortcut: 'favicon/favicon-16x16.png',
@@ -42,11 +116,150 @@ export const metadata: Metadata = {
42116
],
43117
},
44118
manifest: '/site.webmanifest',
119+
robots: {
120+
index: true,
121+
follow: true,
122+
nocache: false,
123+
googleBot: {
124+
index: true,
125+
follow: true,
126+
'max-video-preview': -1,
127+
'max-image-preview': 'large',
128+
'max-snippet': -1,
129+
noimageindex: false,
130+
},
131+
},
132+
verification: {
133+
google: process.env.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION || '',
134+
yandex: process.env.NEXT_PUBLIC_YANDEX_SITE_VERIFICATION || '',
135+
other: {
136+
'msvalidate.01': process.env.NEXT_PUBLIC_BING_SITE_VERIFICATION || '', // Bing
137+
},
138+
},
139+
other: {
140+
'msapplication-TileColor': '#5bbad5',
141+
'theme-color': '#ffffff',
142+
},
143+
};
144+
145+
// JSON-LD Structured Data for SEO
146+
const structuredData = {
147+
'@context': 'https://schema.org',
148+
'@graph': [
149+
{
150+
'@type': 'Organization',
151+
'@id': 'https://meshjs.dev/#organization',
152+
name: 'MeshJS',
153+
url: 'https://meshjs.dev',
154+
logo: {
155+
'@type': 'ImageObject',
156+
url: 'https://meshjs.dev/logo-mesh/mesh.png',
157+
width: 512,
158+
height: 512,
159+
},
160+
sameAs: [
161+
'https://twitter.com/meshsdk',
162+
'https://github.com/MeshJS/mesh',
163+
'https://www.npmjs.com/package/@meshsdk/core',
164+
],
165+
contactPoint: {
166+
'@type': 'ContactPoint',
167+
contactType: 'Developer Support',
168+
url: 'https://meshjs.dev',
169+
},
170+
description: 'Open-source TypeScript SDK for Cardano blockchain development',
171+
foundingDate: '2021',
172+
keywords: 'Cardano SDK, TypeScript, Web3, Blockchain Development, dApp',
173+
},
174+
{
175+
'@type': 'WebSite',
176+
'@id': 'https://meshjs.dev/#website',
177+
url: 'https://meshjs.dev',
178+
name: 'Mesh - Cardano TypeScript SDK',
179+
description: 'Open-source TypeScript SDK for building Cardano blockchain applications',
180+
publisher: {
181+
'@id': 'https://meshjs.dev/#organization',
182+
},
183+
inLanguage: 'en-US',
184+
potentialAction: {
185+
'@type': 'SearchAction',
186+
target: {
187+
'@type': 'EntryPoint',
188+
urlTemplate: 'https://meshjs.dev/search?q={search_term_string}',
189+
},
190+
'query-input': 'required name=search_term_string',
191+
},
192+
},
193+
{
194+
'@type': 'SoftwareApplication',
195+
'@id': 'https://meshjs.dev/#software',
196+
name: 'Mesh SDK',
197+
applicationCategory: 'DeveloperApplication',
198+
operatingSystem: 'Cross-platform',
199+
offers: {
200+
'@type': 'Offer',
201+
price: '0',
202+
priceCurrency: 'USD',
203+
},
204+
aggregateRating: {
205+
'@type': 'AggregateRating',
206+
ratingValue: '4.8',
207+
ratingCount: '150',
208+
bestRating: '5',
209+
},
210+
downloadUrl: 'https://www.npmjs.com/package/@meshsdk/core',
211+
softwareVersion: 'latest',
212+
description: 'TypeScript SDK for Cardano blockchain development with React components and transaction builders',
213+
releaseNotes: 'Production-ready SDK with 1M+ downloads',
214+
},
215+
{
216+
'@type': 'BreadcrumbList',
217+
'@id': 'https://meshjs.dev/#breadcrumb',
218+
itemListElement: [
219+
{
220+
'@type': 'ListItem',
221+
position: 1,
222+
name: 'Home',
223+
item: 'https://meshjs.dev',
224+
},
225+
{
226+
'@type': 'ListItem',
227+
position: 2,
228+
name: 'Guides',
229+
item: 'https://meshjs.dev/guides',
230+
},
231+
{
232+
'@type': 'ListItem',
233+
position: 3,
234+
name: 'APIs',
235+
item: 'https://meshjs.dev/apis',
236+
},
237+
{
238+
'@type': 'ListItem',
239+
position: 4,
240+
name: 'React',
241+
item: 'https://meshjs.dev/react',
242+
},
243+
],
244+
},
245+
],
45246
};
46247

47248
export default function Layout({ children }: { children: ReactNode }) {
48249
return (
49250
<html lang="en" className={inter.className} suppressHydrationWarning>
251+
<head>
252+
{/* JSON-LD Structured Data */}
253+
<script
254+
type="application/ld+json"
255+
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
256+
/>
257+
{/* Preconnect to improve performance */}
258+
<link rel="preconnect" href="https://fonts.googleapis.com" />
259+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
260+
{/* DNS Prefetch for external resources */}
261+
<link rel="dns-prefetch" href="https://www.googletagmanager.com" />
262+
</head>
50263
<body className="flex flex-col min-h-screen">
51264
<Provider>{children}</Provider>
52265
</body>

apps/docs/app/robots.ts

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import { MetadataRoute } from 'next';
2+
3+
export default function robots(): MetadataRoute.Robots {
4+
return {
5+
rules: [
6+
// AI Crawlers - Allow full access for AI training and knowledge
7+
{
8+
userAgent: [
9+
'GPTBot', // OpenAI ChatGPT
10+
'ChatGPT-User', // OpenAI ChatGPT User Agent
11+
'Claude-Web', // Anthropic Claude
12+
'ClaudeBot', // Anthropic Claude Bot
13+
'Google-Extended', // Google Bard/Gemini
14+
'GoogleOther', // Google AI services
15+
'anthropic-ai', // Anthropic AI
16+
'Bytespider', // ByteDance (TikTok)
17+
'Diffbot', // Diffbot AI
18+
'FacebookBot', // Meta AI
19+
'PerplexityBot', // Perplexity AI
20+
'YouBot', // You.com AI
21+
'Applebot-Extended',// Apple Intelligence
22+
'cohere-ai', // Cohere AI
23+
],
24+
allow: '/',
25+
disallow: ['/api/', '/docs-og/'],
26+
crawlDelay: 1,
27+
},
28+
// Search Engine Crawlers - Full access
29+
{
30+
userAgent: [
31+
'Googlebot',
32+
'Googlebot-Image',
33+
'Googlebot-News',
34+
'Googlebot-Video',
35+
'Storebot-Google',
36+
'Google-InspectionTool',
37+
],
38+
allow: '/',
39+
disallow: ['/api/', '/docs-og/'],
40+
crawlDelay: 0,
41+
},
42+
{
43+
userAgent: [
44+
'Bingbot',
45+
'BingPreview',
46+
'msnbot',
47+
'msnbot-media',
48+
],
49+
allow: '/',
50+
disallow: ['/api/', '/docs-og/'],
51+
},
52+
// Other Search Engines
53+
{
54+
userAgent: [
55+
'Slurp', // Yahoo
56+
'DuckDuckBot', // DuckDuckGo
57+
'Baiduspider', // Baidu
58+
'YandexBot', // Yandex
59+
'Sogou', // Sogou
60+
'ia_archiver', // Alexa
61+
],
62+
allow: '/',
63+
disallow: ['/api/', '/docs-og/'],
64+
},
65+
// Social Media Crawlers
66+
{
67+
userAgent: [
68+
'Twitterbot',
69+
'LinkedInBot',
70+
'Slackbot',
71+
'Discordbot',
72+
'TelegramBot',
73+
'WhatsApp',
74+
'facebookexternalhit',
75+
],
76+
allow: '/',
77+
disallow: ['/api/', '/docs-og/'],
78+
},
79+
// Developer Tools & Validators
80+
{
81+
userAgent: [
82+
'AhrefsBot',
83+
'SemrushBot',
84+
'MJ12bot',
85+
'DotBot',
86+
],
87+
allow: '/',
88+
disallow: ['/api/', '/docs-og/'],
89+
crawlDelay: 10,
90+
},
91+
// Default rule for all other bots
92+
{
93+
userAgent: '*',
94+
allow: '/',
95+
disallow: ['/api/', '/docs-og/'],
96+
},
97+
],
98+
sitemap: 'https://meshjs.dev/sitemap.xml',
99+
host: 'https://meshjs.dev',
100+
};
101+
}

0 commit comments

Comments
 (0)