mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
feat: update docs website
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import { baseOptions } from "@/app/layout.config";
|
||||
import { HomeLayout } from "fumadocs-ui/layouts/home";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
export default function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
}): React.ReactElement {
|
||||
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<main className="flex flex-1 flex-col justify-center text-center">
|
||||
<h1 className="mb-4 text-2xl font-bold">Hello World</h1>
|
||||
<p className="text-fd-muted-foreground">
|
||||
You can open{" "}
|
||||
<Link
|
||||
href="/docs"
|
||||
className="text-fd-foreground font-semibold underline"
|
||||
>
|
||||
/docs
|
||||
</Link>{" "}
|
||||
and see the documentation.
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -8,14 +8,16 @@ import {
|
||||
DocsPage,
|
||||
DocsTitle,
|
||||
} from "fumadocs-ui/page";
|
||||
import { notFound } from "next/navigation";
|
||||
import { notFound, permanentRedirect } from "next/navigation";
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
if (!page) {
|
||||
permanentRedirect("/docs/core");
|
||||
}
|
||||
|
||||
const MDX = page.data.body;
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
export default async function Layout({
|
||||
children,
|
||||
...rest
|
||||
}: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={inter.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import { source } from "@/lib/source";
|
||||
import { url } from "@/utils/metadata";
|
||||
import type { MetadataRoute } from "next";
|
||||
// import { getPages } from "./source.config";
|
||||
|
||||
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
return [
|
||||
// ...docs().map<MetadataRoute.Sitemap[number]>((page) => {
|
||||
// return {
|
||||
// url: url(`/en${page.url}`),
|
||||
// lastModified: page.data.exports.lastModified
|
||||
// ? new Date(page.data.exports.lastModified)
|
||||
// : undefined,
|
||||
// changeFrequency: "weekly",
|
||||
// priority: page.url === "/docs/core/get-started/introduction" ? 1 : 0.8,
|
||||
// };
|
||||
// }),
|
||||
...(await Promise.all(
|
||||
source.getPages().map(async (page) => {
|
||||
const { lastModified } = page.data;
|
||||
return {
|
||||
url: url(page.url),
|
||||
lastModified: lastModified ? new Date(lastModified) : undefined,
|
||||
changeFrequency: "weekly",
|
||||
priority: 0.5,
|
||||
} as MetadataRoute.Sitemap[number];
|
||||
}),
|
||||
)),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
title: Components
|
||||
description: Components
|
||||
---
|
||||
|
||||
## Code Block
|
||||
|
||||
```js
|
||||
console.log('Hello World');
|
||||
```
|
||||
|
||||
## Cards
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card title="Learn more about Fumadocs" href="https://fumadocs.vercel.app" />
|
||||
</Cards>
|
||||
@@ -7,9 +7,9 @@ import { attachFile } from "fumadocs-openapi/server";
|
||||
export const source = loader({
|
||||
baseUrl: "/docs",
|
||||
source: createMDXSource(docs, meta),
|
||||
pageTree: {
|
||||
attachFile,
|
||||
},
|
||||
// pageTree: {
|
||||
// attachFile,
|
||||
// },
|
||||
});
|
||||
|
||||
export const openapi = createOpenAPI({
|
||||
|
||||
@@ -184,7 +184,7 @@ export function Pricing() {
|
||||
{t("plan.free.features.f9")}
|
||||
</span>
|
||||
<Link
|
||||
href="https://docs.dokploy.com/en/docs/core/get-started/installation#docker"
|
||||
href="https://docs.dokploy.com/docs/core/installation#docker"
|
||||
target="_blank"
|
||||
className="flex items-start text-sm text-primary"
|
||||
>
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
},
|
||||
"Link": {
|
||||
"docs": {
|
||||
"intro": "https://docs.dokploy.com/get-started/introduction",
|
||||
"install": "https://docs.dokploy.com/en/docs/core/get-started/introduction"
|
||||
"intro": "https://docs.dokploy.com/docs/core",
|
||||
"install": "https://docs.dokploy.com/docs/core/installation"
|
||||
}
|
||||
},
|
||||
"Pricing": {
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
},
|
||||
"Link": {
|
||||
"docs": {
|
||||
"intro": "https://docs.dokploy.com/cn/docs/core/get-started/introduction",
|
||||
"install": "https://docs.dokploy.com/cn/docs/core/get-started/introduction"
|
||||
"intro": "https://docs.dokploy.com/docs/core",
|
||||
"install": "https://docs.dokploy.com/docs/core/installation"
|
||||
}
|
||||
},
|
||||
"Pricing": {
|
||||
|
||||
Reference in New Issue
Block a user