-
Notifications
You must be signed in to change notification settings - Fork 5
/
theme.config.tsx
65 lines (62 loc) · 1.61 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 NewWindow from "./icons/NewWindow";
const logoStyle = {
display: "flex",
alignItems: "center",
fontSize: "1.45rem",
fontWeight: "bold",
};
const config: DocsThemeConfig = {
head: () => {
{
const { asPath } = useRouter();
const url = `https://docs.chainflip.io${asPath}`;
return (
<>
<link rel="icon" href="/chainflip-favicon.ico" sizes="any" />
<meta property="og:url" content={url} />
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://docs.chainflip.io/chainfliplogo.png"
/>
</>
);
}
},
logo: (
<div style={logoStyle}>
<img height="25" width="25" src="/chainfliplogo.png" />
<span className="custom-header" style={{ marginLeft: "8px" }}>
Chainflip Docs
</span>
</div>
),
project: {
link: "https://github.com/chainflip-io",
},
chat: {
link: "https://discord.com/channels/824147014140952596/824147014140952602",
},
docsRepositoryBase:
"https://github.com/chainflip-io/chainflip-docs/blob/main",
footer: {
text: "Chainflip Docs",
},
sidebar: {
titleComponent: ({ title, route }) => (
<div className="flex items-center w-full justify-between">
<span>{title}</span>
{route === "#" && <NewWindow />}
</div>
),
},
useNextSeoProps: () => {
return {
titleTemplate: "Chainflip Docs - %s",
};
},
};
export default config;