forked from CodePhiliaX/Chat2DB-Doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.js
71 lines (69 loc) · 2 KB
/
theme.config.js
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
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
import useLocalesMap from "./components/use-locales-map";
import { languageMap, tableOfContentsTitleMap } from "./translations/text";
export default {
logo: (
<div style={{ display: "flex", alignItems: "center" }}>
<img
style={{ width: "32px", marginRight: "8px" }}
src="https://cdn.chat2db-ai.com/img/logo.svg"
alt="Chat2DB"
/>
<span style={{ fontWeight: 700, fontSize: "20px" }}>Chat2DB</span>
</div>
),
logoLink: "https://chat2db.ai",
project: {
link: "https://github.com/codePhiliaX/chat2db",
},
chat: {
link: "https://discord.gg/uNjb3n5JVN",
},
useNextSeoProps() {
return {
titleTemplate: "%s – Chat2DB",
};
},
toc: {
float: true,
title: () => useLocalesMap(tableOfContentsTitleMap),
},
head: () => {
const { locale } = useRouter();
const des =
locale === "en-US"
? "An intelligent and versatile general-purpose SQL client and reporting tool for databases which integrates AI capabilities."
: "一个集成了AI功能的通用SQL客户端和报表工具。";
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Chat2DB" />
<meta property="og:description" content={des} />
</>
);
},
footer: {
text: (
<span>
MIT {new Date().getFullYear()} ©{" "}
<a href="https://chat2db.ai" target="_blank">
Chat2DB
</a>
.
</span>
),
},
i18n: Object.entries(languageMap).map(([locale, text]) => ({
locale,
text,
})),
// feedback: false,
docsRepositoryBase: "https://github.com/codePhiliaX/chat2db-doc/tree/main/docs",
// feedback:
// "https://github.com/codePhiliaX/chat2db-doc/issues/new?title=Feedback%20for%20%E2%80%9CChangelog%E2%80%9D&labels=feedback",
editLink: false,
nextThemes: {
defaultTheme: "dark",
},
};