Skip to content

SEO Structure

Implement comprehensive SEO strategies for maximum search engine visibility and performance.

components/SEOHead.tsx
export default function SEOHead({ page, locale }) {
const seoData = page.metadata?.seo?.[locale] || {};
return (
<Head>
<title>{seoData.title || page.title[locale]}</title>
<meta name="description" content={seoData.description || page.excerpt?.[locale]} />
<meta property="og:title" content={seoData.title || page.title[locale]} />
<meta property="og:description" content={seoData.description} />
<meta property="og:image" content={seoData.ogImage} />
<link rel="canonical" href={`https://example.com/${locale}/${page.slug[locale]}`} />
</Head>
);
}
const articleSchema = {
"@context": "https://schema.org",
"@type": "Article",
"headline": page.title[locale],
"description": page.excerpt?.[locale],
"author": {
"@type": "Organization",
"name": "Your Company"
},
"publisher": {
"@type": "Organization",
"name": "Your Company"
},
"datePublished": page.publishedAt,
"dateModified": page.updatedAt
};
{supportedLocales.map(loc => (
<link
key={loc}
rel="alternate"
hrefLang={loc}
href={`https://example.com/${loc}/${page.slug[loc]}`}
/>
))}
export async function generateSitemap() {
const pages = await trpc.pages.getPublished.query();
// Generate sitemap with all localized URLs
}

This section will be expanded with detailed SEO implementation.