Skip to content

Commit 0c27dbc

Browse files
committed
✨ feat: Implement extensive SEO enhancements.
1 parent 1019019 commit 0c27dbc

10 files changed

Lines changed: 192 additions & 11 deletions

File tree

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ramifyjs/app",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

app/public/og-image.png

572 KB
Loading

app/public/robots.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Allow: /
4+
5+
# Sitemaps
6+
Sitemap: https://ramifyjs.pages.dev/sitemap.xml

app/src/app/docs/[...slug]/page.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,34 @@ export async function generateMetadata({
6565

6666
return {
6767
title: `${blog.metadata.title} | Ramify JS`,
68-
description: blog.metadata.description,
68+
description:
69+
blog.metadata.description ||
70+
'Learn how to use Ramify JS, a lightweight in-memory database for JavaScript applications.',
71+
keywords: [
72+
'ramifyjs',
73+
'javascript database',
74+
'in-memory database',
75+
'documentation',
76+
blog.metadata.title,
77+
],
78+
alternates: {
79+
canonical: `/docs/${slugPath}`,
80+
},
6981
openGraph: {
70-
title: blog.metadata.title,
71-
description: blog.metadata.description,
82+
title: `${blog.metadata.title} | Ramify JS Documentation`,
83+
description:
84+
blog.metadata.description ||
85+
'Learn how to use Ramify JS, a lightweight in-memory database for JavaScript applications.',
7286
type: 'article',
7387
publishedTime: blog.metadata.date,
88+
url: `https://ramifyjs.pages.dev/docs/${slugPath}`,
89+
},
90+
twitter: {
91+
card: 'summary',
92+
title: `${blog.metadata.title} | Ramify JS`,
93+
description:
94+
blog.metadata.description ||
95+
'Learn how to use Ramify JS, a lightweight in-memory database for JavaScript applications.',
7496
},
7597
};
7698
}

app/src/app/layout.tsx

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,77 @@ const geistMono = Geist_Mono({
1818
});
1919

2020
export const metadata: Metadata = {
21-
title: 'Ramify JS - Lightweight In-Memory Database',
21+
title: {
22+
default: 'Ramify JS - Lightweight In-Memory JavaScript Database',
23+
template: '%s | Ramify JS',
24+
},
2225
description:
23-
'Lightweight in-memory database with querying and live query observation for reactive applications',
26+
'Ramify JS is a lightweight, reactive in-memory database for JavaScript. Perfect for client-side apps, edge runtimes, and Node.js. Zero dependencies, TypeScript-first, with live query observation.',
27+
keywords: [
28+
'in-memory database',
29+
'javascript database',
30+
'js database',
31+
'ramifyjs',
32+
'ramify js',
33+
'client-side database',
34+
'reactive database',
35+
'typescript database',
36+
'browser database',
37+
'edge database',
38+
'local database',
39+
'observable queries',
40+
'live queries',
41+
'in-process database',
42+
],
43+
authors: [{ name: 'Haroon' }],
44+
creator: 'Haroon',
45+
publisher: 'Haroon',
2446
icons: {
2547
icon: '/favicon.svg',
2648
},
49+
metadataBase: new URL('https://ramifyjs.pages.dev'),
50+
alternates: {
51+
canonical: '/',
52+
},
53+
openGraph: {
54+
type: 'website',
55+
locale: 'en_US',
56+
url: 'https://ramifyjs.pages.dev',
57+
title: 'Ramify JS - Lightweight In-Memory JavaScript Database',
58+
description:
59+
'Ramify JS is a lightweight, reactive in-memory database for JavaScript. Perfect for client-side apps, edge runtimes, and Node.js. Zero dependencies, TypeScript-first, with live query observation.',
60+
siteName: 'Ramify JS',
61+
images: [
62+
{
63+
url: '/og-image.png',
64+
width: 1200,
65+
height: 630,
66+
alt: 'Ramify JS - Lightweight In-Memory JavaScript Database',
67+
},
68+
],
69+
},
70+
twitter: {
71+
card: 'summary_large_image',
72+
title: 'Ramify JS - Lightweight In-Memory JavaScript Database',
73+
description:
74+
'Reactive in-memory database for JavaScript. Zero dependencies, TypeScript-first, with live query observation.',
75+
creator: '@haroonwaves',
76+
images: ['/og-image.png'],
77+
},
78+
robots: {
79+
index: true,
80+
follow: true,
81+
googleBot: {
82+
index: true,
83+
follow: true,
84+
'max-video-preview': -1,
85+
'max-image-preview': 'large',
86+
'max-snippet': -1,
87+
},
88+
},
89+
verification: {
90+
google: 'dDpnLa5gq_mEAJTDPAPJQ_iNvI3_t-5uhFDVuSkutZc',
91+
},
2792
};
2893

2994
export default function RootLayout({

app/src/app/page.tsx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,40 @@ import {
1515
import Image from 'next/image';
1616

1717
export default function Home() {
18+
// Structured data for SEO
19+
const structuredData = {
20+
'@context': 'https://schema.org',
21+
'@type': 'SoftwareApplication',
22+
name: 'Ramify JS',
23+
applicationCategory: 'DeveloperApplication',
24+
operatingSystem: 'Cross-platform',
25+
offers: {
26+
'@type': 'Offer',
27+
price: '0',
28+
priceCurrency: 'USD',
29+
},
30+
description:
31+
'Lightweight, reactive in-memory database for JavaScript. Perfect for client-side apps, edge runtimes, and Node.js.',
32+
url: 'https://ramifyjs.pages.dev',
33+
softwareVersion: '0.0.4',
34+
programmingLanguage: 'TypeScript',
35+
keywords:
36+
'in-memory database, javascript database, js database, ramifyjs, client-side database, reactive database',
37+
author: {
38+
'@type': 'Organization',
39+
name: 'Haroon',
40+
url: 'https://github.com/haroonwaves',
41+
},
42+
codeRepository: 'https://github.com/haroonwaves/ramifyjs',
43+
};
44+
1845
return (
1946
<div className="relative min-h-screen overflow-hidden">
47+
{/* Structured Data */}
48+
<script
49+
type="application/ld+json"
50+
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
51+
/>
2052
{/* Animated Background Grid */}
2153
<div className="pointer-events-none fixed inset-0 z-0">
2254
<div className="absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-size-[24px_24px] mask-[radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_110%)]" />
@@ -39,7 +71,7 @@ export default function Home() {
3971
<div className="absolute bottom-[10%] right-[10%] h-[300px] w-[300px] sm:h-[400px] sm:w-[400px] animate-blob rounded-full bg-emerald-500/5 sm:bg-emerald-500/10 blur-[80px] sm:blur-[120px] filter [animation-delay:6s]" />
4072
</div>
4173

42-
<div className="relative z-10">
74+
<main className="relative z-10">
4375
{/* Hero Section */}
4476
<section className="px-6 py-24 sm:py-40 lg:px-8">
4577
<div className="mx-auto max-w-4xl">
@@ -347,7 +379,7 @@ export default function Home() {
347379
</div>
348380
</div>
349381
</section>
350-
</div>
382+
</main>
351383
</div>
352384
);
353385
}

app/src/app/sitemap.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { readdirSync, statSync } from 'fs';
2+
import { join } from 'path';
3+
4+
export const dynamic = 'force-static';
5+
6+
// Recursively find all markdown files in a directory
7+
function getAllMarkdownFiles(dir: string, baseDir: string = dir): string[] {
8+
const files: string[] = [];
9+
const items = readdirSync(dir);
10+
11+
for (const item of items) {
12+
const fullPath = join(dir, item);
13+
const stat = statSync(fullPath);
14+
15+
if (stat.isDirectory()) {
16+
files.push(...getAllMarkdownFiles(fullPath, baseDir));
17+
} else if (item.endsWith('.md')) {
18+
const relativePath = fullPath.substring(baseDir.length + 1);
19+
const slug = relativePath.replace(/\.md$/, '');
20+
files.push(slug);
21+
}
22+
}
23+
24+
return files;
25+
}
26+
27+
export default function sitemap() {
28+
const baseUrl = 'https://ramifyjs.pages.dev';
29+
30+
// Get all documentation pages
31+
const contentDir = join(process.cwd(), 'content/docs');
32+
const docSlugs = getAllMarkdownFiles(contentDir);
33+
34+
const docUrls = docSlugs.map((slug) => ({
35+
url: `${baseUrl}/docs/${slug}`,
36+
lastModified: new Date(),
37+
changeFrequency: 'weekly' as const,
38+
priority: 0.8,
39+
}));
40+
41+
return [
42+
{
43+
url: baseUrl,
44+
lastModified: new Date(),
45+
changeFrequency: 'monthly' as const,
46+
priority: 1,
47+
},
48+
{
49+
url: `${baseUrl}/docs`,
50+
lastModified: new Date(),
51+
changeFrequency: 'weekly' as const,
52+
priority: 0.9,
53+
},
54+
...docUrls,
55+
];
56+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ramifyjs",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"private": true,
55
"keywords": [
66
"ramify",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ramifyjs/core",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"main": "dist/index.js",
55
"module": "dist/index.mjs",
66
"types": "dist/index.d.ts",

packages/react-hooks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ramifyjs/react-hooks",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"main": "dist/index.js",
55
"module": "dist/index.mjs",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)