-
Notifications
You must be signed in to change notification settings - Fork 5
/
theme.config.tsx
82 lines (70 loc) · 2.38 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
80
81
82
import { useRouter } from "next/router";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
const siteHost = "docs.zeroth.bot";
const siteUrl = `https://${siteHost}`;
const siteSocialUrl = `${siteUrl}/social.png`;
const siteDesc = `Powerful, affordable, and open-source robotics platform for builders.`;
const siteTitle = "Zeroth Bot Docs";
const config: DocsThemeConfig = {
logo: <span>Zeroth Bot Docs</span>,
project: {
link: "https://github.com/zeroth-robotics/zeroth-bot",
},
chat: {
link: "https://discord.gg/G6KP76uha5",
},
docsRepositoryBase: "https://github.com/zeroth-robotics/docs/tree/main",
editLink: {
content: "Edit this page on GitHub",
},
sidebar: {
toggleButton: true,
defaultMenuCollapseLevel: 2,
},
head: function useHead() {
const config = useConfig();
const { asPath } = useRouter();
const isIndex = asPath === "/";
const title =
config?.title && !isIndex ? `${config.title} - ${siteTitle}` : siteTitle;
return (
<>
<meta httpEquiv="Content-Language" content="en" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index,follow" />
<meta name="description" content={siteDesc} />
<meta property="og:description" content={siteDesc} />
<meta name="twitter:description" content={siteDesc} />
<meta property="og:site_name" content={siteTitle} />
<meta name="apple-mobile-web-app-title" content={siteTitle} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={siteSocialUrl} />
<meta name="og:image" content={siteSocialUrl} />
<meta property="twitter:domain" content={siteHost} />
<meta name="twitter:site:domain" content={siteHost} />
<meta name="twitter:url" content={siteUrl} />
<meta property="og:title" content={title} />
<meta name="twitter:title" content={title} />
<title>{title}</title>
<link rel="shortcut icon" href="/favicon.ico" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon.ico"
/>
<style>
{`
ul.nx-mt-6 {
margin-top: 0;
}
`}
</style>
</>
);
},
footer: {
component: null,
},
};
export default config;