Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added:: Meta Tags, robots.txt, sitemaps for SEO Enhancement #78

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ClerkProvider } from "@clerk/nextjs";

import { Outfit } from "next/font/google";
import ChatbaseEmbed from "@/components/ChatbaseEmbed";
import { metadata } from "./metadata";

const inter = Outfit({ subsets: ["latin"] });

Expand Down Expand Up @@ -32,10 +33,34 @@ export default function RootLayout({
<ClerkProvider
publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
>
<html lang="en">
<html lang="en">
<head>
<title>{metadata.title}</title>
<meta name="description" content={metadata.description} />
<meta name="keywords" content={metadata.keywords} />
<meta name="author" content={metadata.author} />

{/* Open Graph Meta Tags */}
<meta property="og:title" content={metadata.openGraph.title} />
<meta property="og:description" content={metadata.openGraph.description} />
<meta property="og:url" content={metadata.openGraph.url} />
<meta property="og:site_name" content={metadata.openGraph.siteName} />
<meta property="og:type" content={metadata.openGraph.type} />
<meta property="og:image" content={metadata.openGraph.images[0].url} />
<meta property="og:image:width" content={metadata.openGraph.images[0].width.toString()} />
<meta property="og:image:height" content={metadata.openGraph.images[0].height.toString()} />
<meta property="og:image:alt" content={metadata.openGraph.images[0].alt} />

{/* Twitter Meta Tags */}
<meta name="twitter:card" content={metadata.twitter.card} />
<meta name="twitter:title" content={metadata.twitter.title} />
<meta name="twitter:description" content={metadata.twitter.description} />
<meta name="twitter:image" content={metadata.twitter.images[0]} />
<meta name="twitter:site" content={metadata.twitter.site} />
<meta name="twitter:creator" content={metadata.twitter.creator} />
</head>
<body className={`${inter.className} antialiased`}>
{children}

<ChatbaseEmbed />
</body>
</html>
Expand Down
34 changes: 34 additions & 0 deletions app/metadata.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "AI Content Generator",
description: "AI Content Generator is a web-based application built using Next.js and TypeScript. It is designed to create AI-driven content generation tools with modern development frameworks. The project aims to provide efficient and scalable content workflows to improve productivity, and it is deployable via Vercel for quick and easy hosting.",
keywords: "AI, Content Generator, Next.js, TypeScript, Vercel, scalable workflows",
author: "Team AI Content Generator",

openGraph: {
title: "AI Content Generator",
description: "AI Content Generator is a web-based application built using Next.js and TypeScript.",
url: "http://localhost:3001",
siteName: "AI Content Generator",
images: [
{
url: "/path/to/your/image.jpg",
width: 800,
height: 600,
alt: "AI Content Generator Preview",
},
],
type: "website",
},


twitter: {
card: "summary_large_image",
title: "AI Content Generator",
description: "AI Content Generator is a web-based application built using Next.js and TypeScript.",
images: ["/path/to/your/image.jpg"],
site: "@your_twitter_handle",
creator: "@your_twitter_handle",
},
};
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Disallow: /private
Allow: /
Sitemap: http://localhost:3001/sitemap.xml
1 change: 1 addition & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>http://localhost:3001//</loc><changefreq>daily</changefreq><priority>1.0</priority></url><url><loc>http://localhost:3001//</loc><changefreq>daily</changefreq><priority>1.0</priority></url><url><loc>http://localhost:3001//dashboard</loc><changefreq>weekly</changefreq><priority>0.9</priority></url><url><loc>http://localhost:3001//posts</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://localhost:3001//analytics</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://localhost:3001//contributors</loc><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>http://localhost:3001//settings</loc><changefreq>monthly</changefreq><priority>0.6</priority></url><url><loc>http://localhost:3001//signup</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>http://localhost:3001//login</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>http://localhost:3001//newsletter</loc><changefreq>monthly</changefreq><priority>0.5</priority></url></urlset>
Loading