Skip to content

Commit 1a1dd6b

Browse files
committed
feat: struct pages and fix some issue on theme config
1 parent 5772bf1 commit 1a1dd6b

File tree

4 files changed

+68
-133
lines changed

4 files changed

+68
-133
lines changed

src/pages/_app.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "@/styles/globals.css";
2-
import type { AppProps } from "next/app";
1+
import '@/styles/globals.css'
2+
import type { AppProps } from 'next/app'
33

44
export default function App({ Component, pageProps }: AppProps) {
5-
return <Component {...pageProps} />;
5+
return <Component {...pageProps} />
66
}

src/pages/_document.tsx

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,53 @@
1-
import { Html, Head, Main, NextScript } from "next/document";
1+
import { Html, Head, Main, NextScript } from 'next/document'
2+
import type { Metadata } from 'next'
3+
4+
import { DATA } from '@/data'
5+
6+
export const metadata: Metadata = {
7+
metadataBase: new URL(DATA.url),
8+
title: {
9+
default: DATA.name,
10+
template: `%s - ${DATA.name}`
11+
},
12+
description: DATA.description,
13+
keywords: DATA.keywords,
14+
openGraph: {
15+
title: `${DATA.name}`,
16+
description: DATA.description,
17+
url: DATA.url,
18+
siteName: `${DATA.name}`,
19+
locale: 'en_US',
20+
type: 'website'
21+
},
22+
robots: {
23+
index: true,
24+
follow: true,
25+
googleBot: {
26+
'index': true,
27+
'follow': true,
28+
'max-video-preview': -1,
29+
'max-image-preview': 'large',
30+
'max-snippet': -1
31+
}
32+
},
33+
twitter: {
34+
title: `${DATA.name}`,
35+
card: 'summary_large_image'
36+
},
37+
verification: {
38+
google: '',
39+
yandex: ''
40+
}
41+
}
242

343
export default function Document() {
444
return (
5-
<Html lang="en">
45+
<Html lang='en' suppressHydrationWarning>
646
<Head />
7-
<body className="antialiased">
47+
<body>
848
<Main />
949
<NextScript />
1050
</body>
1151
</Html>
12-
);
52+
)
1353
}

src/pages/index.tsx

Lines changed: 5 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,10 @@
1-
import Image from "next/image";
2-
import localFont from "next/font/local";
3-
4-
const geistSans = localFont({
5-
src: "./fonts/GeistVF.woff",
6-
variable: "--font-geist-sans",
7-
weight: "100 900",
8-
});
9-
const geistMono = localFont({
10-
src: "./fonts/GeistMonoVF.woff",
11-
variable: "--font-geist-mono",
12-
weight: "100 900",
13-
});
1+
import { Inter } from 'next/font/google'
2+
const inter = Inter({ subsets: ['latin'] })
143

154
export default function Home() {
165
return (
17-
<div
18-
className={`${geistSans.variable} ${geistMono.variable} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
19-
>
20-
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
21-
<Image
22-
className="dark:invert"
23-
src="/next.svg"
24-
alt="Next.js logo"
25-
width={180}
26-
height={38}
27-
priority
28-
/>
29-
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
30-
<li className="mb-2">
31-
Get started by editing{" "}
32-
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
33-
src/pages/index.tsx
34-
</code>
35-
.
36-
</li>
37-
<li>Save and see your changes instantly.</li>
38-
</ol>
39-
40-
<div className="flex gap-4 items-center flex-col sm:flex-row">
41-
<a
42-
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
43-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
44-
target="_blank"
45-
rel="noopener noreferrer"
46-
>
47-
<Image
48-
className="dark:invert"
49-
src="/vercel.svg"
50-
alt="Vercel logomark"
51-
width={20}
52-
height={20}
53-
/>
54-
Deploy now
55-
</a>
56-
<a
57-
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
58-
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
59-
target="_blank"
60-
rel="noopener noreferrer"
61-
>
62-
Read our docs
63-
</a>
64-
</div>
65-
</main>
66-
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
67-
<a
68-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
69-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
70-
target="_blank"
71-
rel="noopener noreferrer"
72-
>
73-
<Image
74-
aria-hidden
75-
src="/file.svg"
76-
alt="File icon"
77-
width={16}
78-
height={16}
79-
/>
80-
Learn
81-
</a>
82-
<a
83-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
84-
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
85-
target="_blank"
86-
rel="noopener noreferrer"
87-
>
88-
<Image
89-
aria-hidden
90-
src="/window.svg"
91-
alt="Window icon"
92-
width={16}
93-
height={16}
94-
/>
95-
Examples
96-
</a>
97-
<a
98-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
99-
href="https://nextjs.org?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
100-
target="_blank"
101-
rel="noopener noreferrer"
102-
>
103-
<Image
104-
aria-hidden
105-
src="/globe.svg"
106-
alt="Globe icon"
107-
width={16}
108-
height={16}
109-
/>
110-
Go to nextjs.org →
111-
</a>
112-
</footer>
6+
<div className={inter.className}>
7+
<h1>Hello docs</h1>
1138
</div>
114-
);
9+
)
11510
}

theme.config.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
import Link from "next/link";
2-
import { DocsThemeConfig } from "nextra-theme-docs";
1+
import Link from 'next/link'
2+
import { DocsThemeConfig } from 'nextra-theme-docs'
33

4-
import { KinotioLogo } from "@/components/kinotio-logo";
4+
import { KinotioLogo } from '@/components/kinotio-logo'
55

6-
import { getCurrentYear } from "@/lib/utils";
6+
import { getCurrentYear } from '@/lib/utils'
77

8-
import { DATA } from "@/data";
8+
import { DATA } from '@/data'
99

1010
const config: DocsThemeConfig = {
1111
useNextSeoProps() {
1212
return {
13-
titleTemplate: `%s - ${DATA.name}`,
14-
};
13+
titleTemplate: `%s - ${DATA.name}`
14+
}
1515
},
1616
darkMode: true,
1717
logo: function Logo() {
18-
return <KinotioLogo width={100} height={100} />;
18+
return <KinotioLogo width={100} height={100} />
1919
},
2020
project: {
21-
link: DATA.repo,
21+
link: DATA.repo
2222
},
2323
chat: {
24-
link: DATA.social_url.discord,
24+
link: DATA.social_url.discord
2525
},
2626
docsRepositoryBase: DATA.doc_repo,
2727
footer: {
28-
text: (
28+
content: (
2929
<span>
3030
{`Copyright © ${getCurrentYear()} Developed by `}
31-
<Link href={"https://kinotio.io"} target={"_blank"}>
31+
<Link href={'https://kinotio.io'} target={'_blank'}>
3232
Kinotio
3333
</Link>
3434
.
3535
</span>
36-
),
37-
},
38-
};
36+
)
37+
}
38+
}
3939

40-
export default config;
40+
export default config

0 commit comments

Comments
 (0)