mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
Some checks failed
Build and Push Docker Images / tag_release (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Has been cancelled
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Has been cancelled
- Added multiple new skills to skills-lock.json from the repository `aaron-he-zhu/seo-geo-claude-skills`. - Introduced `fuzzy-search` dependency in package.json for improved search functionality. - Updated pnpm-lock.yaml to include the new `fuzzy-search` package. - Enhanced SEO metadata across various pages, including canonical links and descriptions for better search visibility. - Improved layout and structure of several components, including the homepage and changelog, to enhance user experience.
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page";
|
|
import { notFound } from "next/navigation";
|
|
import { cache } from "react";
|
|
import { source } from "@/lib/source";
|
|
import { getMDXComponents } from "@/mdx-components";
|
|
|
|
const getDocPage = cache((slug?: string[]) => {
|
|
return source.getPage(slug);
|
|
});
|
|
|
|
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
|
|
const params = await props.params;
|
|
const page = getDocPage(params.slug);
|
|
if (!page) notFound();
|
|
|
|
const MDX = page.data.body;
|
|
|
|
return (
|
|
<DocsPage
|
|
toc={page.data.toc}
|
|
full={page.data.full}
|
|
tableOfContent={{
|
|
style: "clerk",
|
|
single: false,
|
|
}}
|
|
tableOfContentPopover={{
|
|
style: "clerk",
|
|
}}
|
|
>
|
|
<DocsTitle>{page.data.title}</DocsTitle>
|
|
<DocsDescription>{page.data.description}</DocsDescription>
|
|
<DocsBody>
|
|
<MDX components={getMDXComponents()} />
|
|
</DocsBody>
|
|
</DocsPage>
|
|
);
|
|
}
|
|
|
|
export async function generateStaticParams() {
|
|
return source.generateParams();
|
|
}
|
|
|
|
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
|
|
const params = await props.params;
|
|
const page = getDocPage(params.slug);
|
|
if (!page) notFound();
|
|
|
|
const slugPath = params.slug ? params.slug.join("/") : "";
|
|
return {
|
|
title: `${page.data.title} | SurfSense Docs`,
|
|
description: page.data.description,
|
|
alternates: {
|
|
canonical: `https://surfsense.com/docs${slugPath ? `/${slugPath}` : ""}`,
|
|
},
|
|
openGraph: {
|
|
title: `${page.data.title} | SurfSense Docs`,
|
|
description: page.data.description,
|
|
type: "article",
|
|
},
|
|
};
|
|
}
|