@@ -4,114 +4,114 @@ import { baseUrl } from "@/utils/metadata";
44import { ImageZoom } from "fumadocs-ui/components/image-zoom" ;
55import defaultMdxComponents from "fumadocs-ui/mdx" ;
66import {
7- DocsBody ,
8- DocsDescription ,
9- DocsPage ,
10- DocsTitle ,
7+ DocsBody ,
8+ DocsDescription ,
9+ DocsPage ,
10+ DocsTitle ,
1111} from "fumadocs-ui/page" ;
1212import { notFound , permanentRedirect } from "next/navigation" ;
1313
1414export 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
5555export async function generateStaticParams ( ) {
56- return source . generateParams ( ) ;
56+ return source . generateParams ( ) ;
5757}
5858
5959export 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}
0 commit comments