mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
* feat(create-turbo): apply official-starter transform * refactor: move folder * wip: monorepo * feat: add builf * refactor: add pr * update * add .env * refactor: update build * refactor: update build docker * refactor: add progress plain * refactor: remove node pty * refactor: remove * remove * refactor: update * refacotr: uopdate * refactor: add remix app * add env * refactor: add pnpm start * refactor: remove * refactor: remove folders * refactor: remove .dockerfile * chore: update biome * test * choe: add husky * remove .docker folder * feat: add docs website * refactor: add husky * chore(version): bump version * refactor: add new changes * refactor: update circle path * refactor: update * refactor: update * refactor: update dockerfile * refactor: update dockerfile * refactor: update command * refactor: update * refactor: update dockerfile * refactor: add tsx * refactor: update dockerfile * refactor: add deps * refactor: up[date * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: yuodate * refactor: remove * refactor: uncomment * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: updare * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: imprt * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: remove * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: change path * refactor: update * refactor: update * refactor: upoadte * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: add * refactor: update * refactor: update * refactor: add * refactor: update * refactor: remove * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: removed * refactor: update * refactor: update * refactor: update * refactor: add config * refactor: update * refactor: add * refactor: update * refactor: update * refactor: remove * refactor: update * refactor: remove * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: add docs * refactor: update * refactor: add website * refactor: update * refactor: update * refactor: update * refactor: update * refactor: add ignore builds * refactor: update * refactor: update * refactor: add * refactor: update * refactor: update * refactor: remove needs * refactor: update * refactor: update * refactor: add config * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: remove * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: add * refactor: update * refactor: update * refactor: update * refactor: update * refactor: upodate * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update package json * refactor: add biome * refactor: add sponsors * refactor: update * refactor: update * refactor: remove * refactor: update * refactor: update * refactor: update * refactor: update scripts * refactor: remove * refactor: update * refactor: remove --------- Co-authored-by: Turbobot <turbobot@vercel.com>
105 lines
2.3 KiB
TypeScript
105 lines
2.3 KiB
TypeScript
import { getLanguages, getPage } from "@/app/source";
|
|
import { url, baseUrl } from "@/utils/metadata";
|
|
import { DocsBody, DocsPage } from "fumadocs-ui/page";
|
|
import type { Metadata } from "next";
|
|
import { notFound, permanentRedirect } from "next/navigation";
|
|
|
|
export default async function Page({
|
|
params,
|
|
}: {
|
|
params: { lang: string; slug?: string[] };
|
|
}) {
|
|
const page = getPage(params.slug, params.lang);
|
|
|
|
if (page == null) {
|
|
permanentRedirect("/docs/core/get-started/introduction");
|
|
}
|
|
|
|
const MDX = page.data.exports.default;
|
|
|
|
return (
|
|
<DocsPage toc={page.data.exports.toc}>
|
|
<DocsBody>
|
|
<h1>{page.data.title}</h1>
|
|
<MDX />
|
|
</DocsBody>
|
|
</DocsPage>
|
|
);
|
|
}
|
|
|
|
export async function generateStaticParams() {
|
|
return getLanguages().flatMap(({ language, pages }) =>
|
|
pages.map((page) => ({
|
|
lang: language,
|
|
slug: page.slugs,
|
|
})),
|
|
);
|
|
}
|
|
|
|
export function generateMetadata({
|
|
params,
|
|
}: {
|
|
params: { lang: string; slug?: string[] };
|
|
}) {
|
|
const page = getPage(params.slug, params.lang);
|
|
if (page == null) {
|
|
permanentRedirect("/docs/core/get-started/introduction");
|
|
}
|
|
return {
|
|
title: page.data.title,
|
|
|
|
description: page.data.description,
|
|
robots: "index,follow",
|
|
alternates: {
|
|
canonical: new URL(`${baseUrl}${page.url}`).toString(),
|
|
languages: {
|
|
zh: `${baseUrl}/cn${page.url.replace("/cn", "")}`,
|
|
en: `${baseUrl}/en${page.url.replace("/en", "")}`,
|
|
},
|
|
},
|
|
openGraph: {
|
|
title: page.data.title,
|
|
description: page.data.description,
|
|
url: new URL(`${baseUrl}`).toString(),
|
|
images: [
|
|
{
|
|
url: new URL(
|
|
`${baseUrl}/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.7cfd81d9.png&w=828&q=75`,
|
|
).toString(),
|
|
width: 1200,
|
|
height: 630,
|
|
alt: page.data.title,
|
|
},
|
|
],
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
creator: "@siumauricio",
|
|
title: page.data.title,
|
|
description: page.data.description,
|
|
images: [
|
|
{
|
|
url: new URL(
|
|
`${baseUrl}/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.7cfd81d9.png&w=828&q=75`,
|
|
).toString(),
|
|
width: 1200,
|
|
height: 630,
|
|
alt: page.data.title,
|
|
},
|
|
],
|
|
},
|
|
applicationName: "Dokploy Docs",
|
|
keywords: [
|
|
"dokploy",
|
|
"vps",
|
|
"open source",
|
|
"cloud",
|
|
"self hosting",
|
|
"free",
|
|
],
|
|
icons: {
|
|
icon: "/icon.svg",
|
|
},
|
|
} satisfies Metadata;
|
|
}
|