diff --git a/apps/landing/src/app/(landings)/blog/page.tsx b/apps/landing/src/app/(landings)/blog/page.tsx index 9134650..45e1844 100644 --- a/apps/landing/src/app/(landings)/blog/page.tsx +++ b/apps/landing/src/app/(landings)/blog/page.tsx @@ -13,7 +13,42 @@ import { export const metadata: Metadata = { title: 'Blog | Banatie', description: - 'Articles, guides, and updates about AI-powered placeholder images.', + 'Articles, guides, and updates about AI-powered image generation.', + robots: 'index, follow', + + alternates: { + canonical: '/blog/', + languages: { + en: '/blog/', + 'x-default': '/blog/', + }, + }, + + openGraph: { + type: 'website', + url: '/blog/', + title: 'Blog | Banatie', + description: + 'Articles, guides, and updates about AI-powered image generation.', + siteName: 'Banatie', + locale: 'en_US', + images: [ + { + url: '/og-image.png', + width: 1200, + height: 630, + alt: 'Banatie Blog - AI Image Generation Articles', + }, + ], + }, + + twitter: { + card: 'summary_large_image', + title: 'Blog | Banatie', + description: + 'Articles, guides, and updates about AI-powered image generation.', + images: ['/og-image.png'], + }, }; // const defaultTags = ['ai', 'image-generation', 'api', 'midjourney', 'flux']; diff --git a/apps/landing/src/app/(landings)/blog/utils.ts b/apps/landing/src/app/(landings)/blog/utils.ts index 0802452..6a16de7 100644 --- a/apps/landing/src/app/(landings)/blog/utils.ts +++ b/apps/landing/src/app/(landings)/blog/utils.ts @@ -13,15 +13,42 @@ export const getPostsBySlugs = (slugs: string[]): BlogPost[] => .filter((post): post is BlogPost => post !== undefined); export const generatePostMetadata = (post: BlogPost): Metadata => ({ - title: post.title, + title: `${post.title} | Banatie Blog`, description: post.description, + robots: 'index, follow', + + alternates: { + canonical: `/blog/${post.slug}/`, + languages: { + en: `/blog/${post.slug}/`, + 'x-default': `/blog/${post.slug}/`, + }, + }, + openGraph: { + type: 'article', + url: `/blog/${post.slug}/`, + title: post.title, + description: post.description, + siteName: 'Banatie', + locale: 'en_US', + images: [ + { + url: post.heroImage, + width: 1200, + height: 630, + alt: post.title, + }, + ], + publishedTime: post.date, + authors: [post.author.name], + }, + + twitter: { + card: 'summary_large_image', title: post.title, description: post.description, images: [post.heroImage], - type: 'article', - publishedTime: post.date, - authors: [post.author.name], }, }); diff --git a/apps/landing/src/app/sitemap.ts b/apps/landing/src/app/sitemap.ts index 72d3a03..2dccd58 100644 --- a/apps/landing/src/app/sitemap.ts +++ b/apps/landing/src/app/sitemap.ts @@ -1,4 +1,5 @@ import { MetadataRoute } from 'next'; +import { blogPosts } from './(landings)/blog/blog-posts'; export default function sitemap(): MetadataRoute.Sitemap { const baseUrl = 'https://banatie.app'; @@ -10,6 +11,19 @@ export default function sitemap(): MetadataRoute.Sitemap { changeFrequency: 'weekly', priority: 1, }, + // Blog + { + url: `${baseUrl}/blog/`, + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.9, + }, + ...blogPosts.map((post) => ({ + url: `${baseUrl}/blog/${post.slug}/`, + lastModified: new Date(post.date), + changeFrequency: 'monthly' as const, + priority: 0.8, + })), // Documentation - Guides { url: `${baseUrl}/docs/`,