feat: blog metatags
This commit is contained in:
parent
7a9997cf79
commit
b6dde32c35
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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} | 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,
|
||||
openGraph: {
|
||||
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],
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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/`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue