This repository has been archived by the owner on Jun 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththeme.config.tsx
140 lines (135 loc) · 3.75 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { Analytics } from "@vercel/analytics/react";
import { useRouter } from "next/router";
import { GoogleAnalytics } from "@next/third-parties/google";
import ClientOnly from "./components/ClientOnly";
import Footer from "./components/Footer";
const googleAnalyticsMeasurementId: string =
process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS;
const headProp = () => {
const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig();
const url =
"https://docs.0rbit.co/" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
return (
<head>
<title>0rbit Docs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="0rbit Technical Documentation" />
<meta
name="description"
content="0rbit Technical Documentation | The Decentralized Oracle on AO"
/>
<meta
property="og:description"
content={
frontMatter.description ||
"0rbit Technical Documentation | The Decentralized Oracle on AO"
}
/>
<meta
property="og:image"
content="https://www.0rbit.co/logos/ogBanner.jpeg"
/>
<meta
property="og:image:secure_url"
content="https://www.0rbit.co/logos/ogBanner.jpeg"
/>
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || "0rbit"} />
<meta
property="twitter:image"
content="https://www.0rbit.co/logos/ogBanner.jpeg"
></meta>
<meta
property="twitter:title"
content="0rbit Technical Documentation"
></meta>
<meta
property="twitter:description"
content="0rbit Technical Documentation | The Decentralized Oracle on AO"
></meta>
<link rel="shortcut icon" href="/favicon.ico" />
</head>
);
};
const config: DocsThemeConfig = {
primaryHue: 37,
docsRepositoryBase: "https://github.com/0rbit-co/docs/blob/main",
useNextSeoProps() {
const { asPath } = useRouter();
let _titleTemplate: string =
asPath === "/" ? "0rbit Docs" : "0rbit Docs | %s";
return {
titleTemplate: _titleTemplate,
defaultTitle: "0rbit Technical Documentation",
description:
"0rbit Technical Documentation | The Decentralized Oracle on AO",
openGraph: {
title: "0rbit Technical Documentation",
description:
"0rbit Technical Documentation | The Decentralized Oracle on AO",
images: [
{
url: "https://raw.githubusercontent.com/0rbit-co/docs/main/public/images/logo/logo.svg",
},
],
},
twitter: {
handle: "@0rbitco",
site: "@site",
cardType: "summary_large_image",
},
};
},
head: headProp,
darkMode: false,
logo: (
<>
<img
src="/images/logo/lightLogo.svg"
alt="0rbit"
width="70"
height="70"
/>
{/* <span style={{ marginLeft: ".4em", fontWeight: 800 }}>0rbit</span> */}
</>
),
logoLink: "http://docs.0rbit.co",
project: {
link: "https://github.com/0rbit-co",
},
chat: {
link: "https://discord.gg/JVSjqaKJgV",
},
sidebar: {
autoCollapse: true,
},
main: ({ children }) => (
<>
<ClientOnly>{children}</ClientOnly>
<Analytics />
<GoogleAnalytics gaId={googleAnalyticsMeasurementId} />
</>
),
toc: {
backToTop: true,
},
editLink: {
text: "Edit this page on GitHub",
},
feedback: {
content: "Is this page helpful?",
labels: "feedback",
},
navigation: true,
footer: {
component: (
<div className="">
<Footer />
</div>
),
},
};
export default config;