mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-05 22:02:15 +00:00
docs: add description frontmatter to content pages for SEO (#11654)
This commit is contained in:
@@ -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,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: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user