-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththeme.config.tsx
65 lines (61 loc) · 1.31 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
import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
import Image from "next/image";
const config: DocsThemeConfig = {
project: {
link: "https://github.com/buape/kiai-docs",
},
chat: {
link: "https://discord.gg/v6YJp5PSd5",
},
docsRepositoryBase: "https://github.com/buape/kiai-docs/tree/main",
footer: {
text: "© 2024 Buape Studios",
},
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s – Kiai Docs",
};
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig();
const url =
"https://docs.kiaibot.com" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
return (
<>
<meta property="og:url" content={url} />
<meta
property="og:title"
content={frontMatter.title || "Kiai Documentation"}
/>
<meta
property="og:description"
content={
frontMatter.description ||
"The main documentation for Kiai"
}
/>
</>
);
},
logo: (
<>
<Image
src="/kiai.png"
alt="Kiai Logo"
width={25}
height={25}
/>
<span style={{ marginLeft: '.4em', fontWeight: 800 }}>
Kiai Documentation
</span>
</>
),
};
export default config;