generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
79 lines (76 loc) · 1.76 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
import { DocsThemeConfig } from "nextra-theme-docs";
import Image from "next/image";
import React from "react";
import pl from "#pl";
import styles from "#styles/sidebar.module.css";
const config: DocsThemeConfig = {
logo: <span>{pl.theme.logo}</span>,
project: {
link: pl.theme.project.link,
},
// chat: {
// link: 'https://discord.com',
// },
docsRepositoryBase: pl.theme.docsRepositoryBase,
footer: {
text: pl.theme.footer.text,
},
sidebar: {
defaultMenuCollapseLevel: 3,
titleComponent({ title, type }) {
if (type === "separator") {
return (
<div style={{ background: "cyan", textAlign: "center" }}>{title}</div>
);
}
if (title === "JavaScript") {
return (
<div className={styles.iconTitle}>
<Image
src={"/icons/javascript.svg"}
alt="jsIcon"
width={32}
height={32}
/>{" "}
{title}
</div>
);
}
if (title === "React.js") {
return (
<div className={styles.iconTitle}>
<Image
src={"/icons/react.svg"}
alt="jsIcon"
width={32}
height={32}
/>{" "}
{title}
</div>
);
}
if (title === "TypeScript") {
return (
<div className={styles.iconTitle}>
<Image src={"/icons/ts.svg"} alt="jsIcon" width={32} height={32} />{" "}
{title}
</div>
);
}
return <>{title}</>;
},
},
toc: {
title: pl.theme.toc.title,
},
editLink: {
text: pl.theme.editLink.text,
},
feedback: {
content: null,
},
search: {
component: null,
},
};
export default config;