-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy paththeme.config.tsx
More file actions
105 lines (101 loc) · 3.22 KB
/
theme.config.tsx
File metadata and controls
105 lines (101 loc) · 3.22 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { useRouter } from "next/router";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import Search from "./components/Search/Search";
import MixpanelLogoWordmark from "./components/svg/MixpanelLogoWordmark";
import MainContent from "./components/MainContent/MainContent";
import SignUpButton from "./components/SignUpButton/SignUpButton";
import ChangelogPostHeader from "./components/ChangelogPostHeader/ChangelogPostHeader";
import { VideoButtonWithModal } from "./components/VideoButtonWithModal";
import ExtendedAccordion from "./components/ExtendedAccordion/ExtendedAccordion";
const config: DocsThemeConfig = {
darkMode: true,
nextThemes: {
defaultTheme: `system`,
},
docsRepositoryBase: "https://github.com/mixpanel/docs/tree/main",
head() {
const { pathname } = useRouter();
const { title } = useConfig();
const url = `https://docs.mixpanel.com${pathname}`;
return (
<>
<title>{`${title} - Mixpanel Docs`}</title>
<meta property="og:url" content={url} />
<link rel="canonical" href={url} />
<meta property="og:title" content={`${title} - Mixpanel Docs`} />
<meta
property="og:description"
content={`Read more about Mixpanel documentation`}
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href={`https://cdn.mxpnl.com/marketing-site/static/favicons/apple-touch-icon.png`}
/>
<link
rel="icon"
sizes="16x16"
href="https://cdn.mxpnl.com/marketing-site/static/favicons/favicon-16x16.png"
type="image/png"
/>
<link
rel="icon"
sizes="32x32"
href="https://cdn.mxpnl.com/marketing-site/static/favicons/favicon-32x32.png"
type="image/png"
/>
<link
rel="mask-icon"
href={`https://cdn.mxpnl.com/marketing-site/static/favicons/safari-pinned-tab.svg`}
color="#7856ff"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="theme-color" content="#ffffff" />
</>
);
},
feedback: {
content: "Contact Support",
useLink: () => "https://mixpanel.com/contact-us/support",
},
footer: {
content: (
<div style={{ display: "flex", flexWrap: "wrap" }}>
<div style={{ flexBasis: "100%" }}>
© Mixpanel {new Date().getFullYear()}
</div>
<div style={{ fontSize: "75%" }}>
<a
href="javascript:void(0)"
// @ts-expect-error - truste is injected by TrustArc script at runtime
onClick={() => truste.eu.clickListener()}
>
Your Privacy Rights
</a>
</div>
</div>
),
},
logo: <MixpanelLogoWordmark width={125} />,
logoLink: "https://mixpanel.com/home/",
main: MainContent,
components: {
ChangelogPostHeader: ChangelogPostHeader,
VideoButtonWithModal: VideoButtonWithModal,
ExtendedAccordion: ExtendedAccordion,
},
search: {
component: Search,
},
project: {
link: "https://github.com/mixpanel/docs",
},
navbar: {
extraContent: SignUpButton,
},
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton: true,
},
};
export default config;