Skip to content

Commit af1b2db

Browse files
author
Mauricio Siu
committed
refactor: standardize code formatting and improve readability
- Updated various files to ensure consistent code formatting, including adjusting indentation and spacing. - Refactored components and utility functions for better readability and maintainability. - Removed unnecessary newlines and ensured consistent use of single quotes for strings across the codebase.
1 parent 878f7b8 commit af1b2db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3275
-2864
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Example:
4242
feat: add new feature
4343
```
4444

45-
4645
## Pull Request
4746

4847
- The `main` branch is the source of truth and should always reflect the latest stable release.

apps/docs/app/docs/[[...slug]]/page.tsx

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -4,114 +4,114 @@ import { baseUrl } from "@/utils/metadata";
44
import { ImageZoom } from "fumadocs-ui/components/image-zoom";
55
import defaultMdxComponents from "fumadocs-ui/mdx";
66
import {
7-
DocsBody,
8-
DocsDescription,
9-
DocsPage,
10-
DocsTitle,
7+
DocsBody,
8+
DocsDescription,
9+
DocsPage,
10+
DocsTitle,
1111
} from "fumadocs-ui/page";
1212
import { notFound, permanentRedirect } from "next/navigation";
1313

1414
export default async function Page(props: {
15-
params: Promise<{ slug?: string[] }>;
15+
params: Promise<{ slug?: string[] }>;
1616
}) {
17-
const params = await props.params;
18-
const page = source.getPage(params.slug);
19-
if (!page) {
20-
permanentRedirect("/docs/core");
21-
}
17+
const params = await props.params;
18+
const page = source.getPage(params.slug);
19+
if (!page) {
20+
permanentRedirect("/docs/core");
21+
}
2222

23-
const MDX = page.data.body;
23+
const MDX = page.data.body;
2424

25-
return (
26-
<DocsPage toc={page.data.toc} full={page.data.full}>
27-
<DocsTitle>{page.data.title}</DocsTitle>
28-
<DocsDescription>{page.data.description}</DocsDescription>
29-
<DocsBody>
30-
<MDX
31-
components={{
32-
...defaultMdxComponents,
33-
ImageZoom: (props) => <ImageZoom {...(props as any)} />,
34-
p: ({ children }) => (
35-
<p className="text-[#3E4342] dark:text-muted-foreground">
36-
{children}
37-
</p>
38-
),
39-
li: ({ children, id }) => (
40-
<li
41-
{...{ id }}
42-
className="text-[#3E4342] dark:text-muted-foreground"
43-
>
44-
{children}
45-
</li>
46-
),
47-
APIPage: openapi.APIPage,
48-
}}
49-
/>
50-
</DocsBody>
51-
</DocsPage>
52-
);
25+
return (
26+
<DocsPage toc={page.data.toc} full={page.data.full}>
27+
<DocsTitle>{page.data.title}</DocsTitle>
28+
<DocsDescription>{page.data.description}</DocsDescription>
29+
<DocsBody>
30+
<MDX
31+
components={{
32+
...defaultMdxComponents,
33+
ImageZoom: (props) => <ImageZoom {...(props as any)} />,
34+
p: ({ children }) => (
35+
<p className="text-[#3E4342] dark:text-muted-foreground">
36+
{children}
37+
</p>
38+
),
39+
li: ({ children, id }) => (
40+
<li
41+
{...{ id }}
42+
className="text-[#3E4342] dark:text-muted-foreground"
43+
>
44+
{children}
45+
</li>
46+
),
47+
APIPage: openapi.APIPage,
48+
}}
49+
/>
50+
</DocsBody>
51+
</DocsPage>
52+
);
5353
}
5454

5555
export async function generateStaticParams() {
56-
return source.generateParams();
56+
return source.generateParams();
5757
}
5858

5959
export async function generateMetadata(props: {
60-
params: Promise<{ slug?: string[] }>;
60+
params: Promise<{ slug?: string[] }>;
6161
}) {
62-
const params = await props.params;
63-
const page = source.getPage(params.slug);
64-
if (!page) notFound();
62+
const params = await props.params;
63+
const page = source.getPage(params.slug);
64+
if (!page) notFound();
6565

66-
return {
67-
title: page.data.title,
66+
return {
67+
title: page.data.title,
6868

69-
description: page.data.description,
70-
robots: "index,follow",
71-
alternates: {
72-
canonical: new URL(`${baseUrl}${page.url}`).toString(),
73-
languages: {
74-
en: `${baseUrl}/${page.url}`,
75-
},
76-
},
77-
openGraph: {
78-
title: page.data.title,
79-
description: page.data.description,
80-
url: new URL(`${baseUrl}`).toString(),
81-
images: [
82-
{
83-
url: new URL(`${baseUrl}/logo.png`).toString(),
84-
width: 1200,
85-
height: 630,
86-
alt: page.data.title,
87-
},
88-
],
89-
},
90-
twitter: {
91-
card: "summary_large_image",
92-
creator: "@getdokploy",
93-
title: page.data.title,
94-
description: page.data.description,
95-
images: [
96-
{
97-
url: new URL(`${baseUrl}/logo.png`).toString(),
98-
width: 1200,
99-
height: 630,
100-
alt: page.data.title,
101-
},
102-
],
103-
},
104-
applicationName: "Dokploy Docs",
105-
keywords: [
106-
"dokploy",
107-
"vps",
108-
"open source",
109-
"cloud",
110-
"self hosting",
111-
"free",
112-
],
113-
icons: {
114-
icon: "/icon.svg",
115-
},
116-
};
69+
description: page.data.description,
70+
robots: "index,follow",
71+
alternates: {
72+
canonical: new URL(`${baseUrl}${page.url}`).toString(),
73+
languages: {
74+
en: `${baseUrl}/${page.url}`,
75+
},
76+
},
77+
openGraph: {
78+
title: page.data.title,
79+
description: page.data.description,
80+
url: new URL(`${baseUrl}`).toString(),
81+
images: [
82+
{
83+
url: new URL(`${baseUrl}/logo.png`).toString(),
84+
width: 1200,
85+
height: 630,
86+
alt: page.data.title,
87+
},
88+
],
89+
},
90+
twitter: {
91+
card: "summary_large_image",
92+
creator: "@getdokploy",
93+
title: page.data.title,
94+
description: page.data.description,
95+
images: [
96+
{
97+
url: new URL(`${baseUrl}/logo.png`).toString(),
98+
width: 1200,
99+
height: 630,
100+
alt: page.data.title,
101+
},
102+
],
103+
},
104+
applicationName: "Dokploy Docs",
105+
keywords: [
106+
"dokploy",
107+
"vps",
108+
"open source",
109+
"cloud",
110+
"self hosting",
111+
"free",
112+
],
113+
icons: {
114+
icon: "/icon.svg",
115+
},
116+
};
117117
}

apps/docs/app/docs/layout.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import { DocsLayout } from "fumadocs-ui/layouts/docs";
55
import type { ReactNode } from "react";
66

77
export const metadata = createMetadata({
8-
title: {
9-
template: "%s | Dokploy",
10-
default: "Dokploy",
11-
},
12-
description: "The Open Source Alternative to Vercel, Heroku, and Netlify",
13-
metadataBase: new URL(baseUrl),
8+
title: {
9+
template: "%s | Dokploy",
10+
default: "Dokploy",
11+
},
12+
description: "The Open Source Alternative to Vercel, Heroku, and Netlify",
13+
metadataBase: new URL(baseUrl),
1414
});
1515

1616
export default function Layout({ children }: { children: ReactNode }) {
17-
return (
18-
<DocsLayout tree={source.pageTree} {...baseOptions}>
19-
{children}
20-
</DocsLayout>
21-
);
17+
return (
18+
<DocsLayout tree={source.pageTree} {...baseOptions}>
19+
{children}
20+
</DocsLayout>
21+
);
2222
}

0 commit comments

Comments
 (0)