forked from L0stedMrlion/lionpolicerp-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
78 lines (73 loc) · 2.02 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
import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
function useNextSeoProps() {
const { asPath } = useRouter();
const arr = asPath.replace(/[-_]/g, " ").split("/");
const category = (arr[1][0] !== "#" && arr[1]) || "Lion Police Roleplay 3.0";
const rawTitle = arr[arr.length - 1];
const title =
/[a-z]/.test(rawTitle) && /[A-Z]/.test(rawTitle) ? rawTitle : "%s";
return {
titleTemplate: `${title} - ${
rawTitle === category
? "Documentation"
: category.replace(/(^\w|\s\w)/g, (m) => m.toUpperCase())
}`,
};
}
function useHead() {
const { asPath } = useRouter();
const { frontMatter, title } = useConfig();
const description =
frontMatter.description || "Documentation Lion Police Roleplay";
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="lion.ico" />
<meta httpEquiv="Content-Language" content="en" />
<meta name="description" content={description} />
<meta name="og:title" content={title} />
<meta name="og:description" content={description} />
</>
);
}
const config: DocsThemeConfig = {
navigation: {
prev: false,
next: false,
},
primaryHue: 205,
primarySaturation: 59,
docsRepositoryBase:
"https://github.com/L0stedMrlion/lionpolicerp-guide/tree/main",
logo: (
<div
style={{
paddingLeft: "50px",
lineHeight: "38px",
background:
"url('https://i.ibb.co/sszfTrX/policelogo.png') no-repeat left",
backgroundSize: "38px",
fontWeight: 550,
}}
>
Lion Police Roleplay™ 3.0
</div>
),
useNextSeoProps: useNextSeoProps,
head: useHead,
project: {
link: "https://github.com/L0stedMrlion/lionpolicerp-guide",
},
chat: {
link: "https://discord.gg/Uewwf3tpz3",
},
toc: {
backToTop: true,
},
footer: {
text: "🦁 Lion's Project™ 3.0",
},
};
export default config;