-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
89 lines (81 loc) · 2.83 KB
/
theme.config.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import React, {useEffect, useState} from 'react'
import { DocsThemeConfig } from 'nextra-theme-docs'
import {useRouter} from "next/router";
const config: DocsThemeConfig = {
logo: () => {
return (
<span className="text-2xl font-bold">
<img src="/img/PNX_LOGO_sm.png" alt="PowerNukkitX Logo" width="50" height="50"/>
</span>
)
},
project: {
link: 'https://github.com/PowerNukkitX/PowerNukkitX',
},
chat: {
link: 'https://discord.com',
},
darkMode: true,
docsRepositoryBase: 'https://github.com/PowerNukkitX/docs',
footer: {
component: function () {
return <></>
}
},
primarySaturation: 0,
head: function useHead() {
const description = "PowerNukkitX Docs"
const title = "PowerNukkitX - Docs"
return (
<>
<meta name="title" content={title}/>
<meta name="description"
content={description}/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://v2.powernukkitx.com/team"/>
<meta property="og:title" content={title}/>
<meta property="og:description"
content={description}/>
<meta property="og:image" content=""/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="100"/>
<meta property="og:image:height" content="100"/>
<meta property="twitter:url" content="https://v2.powernukkitx.com/team"/>
<meta property="twitter:title" content={title}/>
<meta property="twitter:description"
content={description}/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="anonymous"
/>
<link rel="shortcut icon" href={"/favicon.svg"} type="image/svg+xml"/>
<link rel="apple-touch-icon" href={"/favicon.svg"} type="image/svg+xml"/>
</>
)
},
useNextSeoProps() {
const {asPath, pathname, query} = useRouter();
if (['/'].includes(asPath)) {
return { titleTemplate: 'PowerNukkitX | Docs' };
}
return { titleTemplate: '%s | Docs' };
},
editLink: {
text: "Edit this page on GitHub",
},
sidebar: {
toggleButton: true,
defaultMenuCollapseLevel: 1,
},
toc: {
float: true,
backToTop: true,
},
i18n: [
{ locale: 'en-US', text: 'English' },
{ locale: 'fr-FR', text: 'Français' },
]
}
export default config