fix(public): more seo things

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-21 10:11:28 +01:00
parent f567c4e378
commit 290c9a4435
2 changed files with 24 additions and 3 deletions

View File

@@ -1,12 +1,13 @@
import { url, siteName } from '@/app/layout.config';
import { source } from '@/lib/source'; import { source } from '@/lib/source';
import defaultMdxComponents from 'fumadocs-ui/mdx';
import { import {
DocsPage,
DocsBody, DocsBody,
DocsDescription, DocsDescription,
DocsPage,
DocsTitle, DocsTitle,
} from 'fumadocs-ui/page'; } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';
import defaultMdxComponents from 'fumadocs-ui/mdx';
export default async function Page(props: { export default async function Page(props: {
params: Promise<{ slug?: string[] }>; params: Promise<{ slug?: string[] }>;
@@ -42,5 +43,25 @@ export async function generateMetadata(props: {
return { return {
title: page.data.title, title: page.data.title,
description: page.data.description, description: page.data.description,
alternates: {
canonical: url(page.url),
},
icons: {
apple: '/apple-touch-icon.png',
icon: '/favicon.ico',
},
manifest: '/site.webmanifest',
openGraph: {
url: url(page.url),
type: 'article',
images: [
{
url: url('/ogimage.jpg'),
width: 1200,
height: 630,
alt: siteName,
},
],
},
}; };
} }

View File

@@ -1,5 +1,5 @@
--- ---
title: Introduction title: Introduction to OpenPanel
description: The OpenPanel SDKs provide a set of core methods that allow you to track events, identify users, and more. Here's an overview of the key methods available in the SDKs. description: The OpenPanel SDKs provide a set of core methods that allow you to track events, identify users, and more. Here's an overview of the key methods available in the SDKs.
--- ---