mirror of
https://github.com/fosrl/docs-v2.git
synced 2026-09-30 17:59:10 +02:00
fix open in github
This commit is contained in:
@@ -11,7 +11,7 @@ import { notFound } from 'next/navigation';
|
||||
import { getMDXComponents } from '@/components/mdx';
|
||||
import type { Metadata } from 'next';
|
||||
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
||||
import { getPageImageUrl, getPageMarkdownUrl, gitConfig, siteUrl } from '@/lib/shared';
|
||||
import { appName, docsDir, getPageImageUrl, getPageMarkdownUrl, gitConfig, siteUrl } from '@/lib/shared';
|
||||
import { AskAIAboutPage } from '@/components/ai/ask-page';
|
||||
import { SiteFooter } from '@/components/site-footer';
|
||||
import { AskBar } from '@/components/ai/ask-bar';
|
||||
@@ -46,7 +46,7 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) {
|
||||
<ViewOptionsPopover
|
||||
markdownUrl={markdownUrl}
|
||||
pageUrl={`${siteUrl}${page.url}`}
|
||||
githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/${page.path}`}
|
||||
githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/${docsDir}/${page.path}`}
|
||||
/>
|
||||
<AskAIAboutPage title={page.data.title} />
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@ export async function generateMetadata(props: PageProps<'/[[...slug]]'>): Promis
|
||||
|
||||
const isHome = page.slugs.length === 0;
|
||||
return {
|
||||
title: isHome ? { absolute: `${page.data.title} - Pangolin Docs` } : page.data.title,
|
||||
title: isHome ? { absolute: `${page.data.title} | ${appName}` } : page.data.title,
|
||||
description: page.data.description,
|
||||
alternates: {
|
||||
canonical: page.url,
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ const inter = Inter({
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(siteUrl),
|
||||
title: { template: `%s - ${appName}`, default: appName },
|
||||
title: { template: `%s | ${appName}`, default: appName },
|
||||
description: siteDescription,
|
||||
appleWebApp: { title: appName },
|
||||
openGraph: { siteName: appName, images: '/images/home-social-graph.png' },
|
||||
|
||||
Reference in New Issue
Block a user