docs: add description frontmatter to content pages for SEO (#11654)

This commit is contained in:
Florian Forster
2026-02-21 07:44:42 -08:00
committed by GitHub
parent afeeee87c3
commit 2c260a1f10
304 changed files with 421 additions and 46 deletions
+6 -3
View File
@@ -1,7 +1,6 @@
import { getPageImage, getPage, source } from '@/lib/source';
import {
DocsBody,
DocsDescription,
DocsPage,
DocsTitle,
} from 'fumadocs-ui/layouts/docs/page';
@@ -23,7 +22,6 @@ export default async function Page(props: any) {
return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX
components={getMDXComponents({
@@ -66,9 +64,14 @@ export async function generateMetadata(
}
}
let description = page.data.description;
if (!description) {
description = `Explore ZITADEL documentation for ${page.data.title}. Learn how to integrate, manage, and secure your applications with our comprehensive identity and access management solutions.`;
}
return {
title: page.data.title,
description: page.data.description,
description: description.length > 200 ? description.substring(0, 197) + '...' : description,
alternates: {
canonical: canonicalUrl,
},
+4
View File
@@ -4,6 +4,10 @@ import { Providers } from './providers';
export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'),
title: {
template: '%s | ZITADEL Docs',
default: 'ZITADEL Documentation',
},
icons: {
other: [
{